Tuesday 16 July 2013

Collective Search Help

Business Scenario: Lets to find out the Name we can refer to two different tables which provides two different ways of Name selection. Let's first create two tables and build to elementary search help on two tables and use these elementary search help in the Collective Search Help.
Step 1. Go to TCODE-SE11, Create a table ZJAVA_TEAM.




Step 2. Provide the delivery class, save it local package and click on the Technical settings button.


















Step 3. Provide the technical settings details as mentioned below and save it and at last click on the BACK button.






















Step 4. Mention the table Fields, data elements,  primary keys and activate the table.


















Step 5. At last mention the records in the table so that we can get some Names.


















Step 6. After record creation, we have the set of values in the table.


















Step 7. Let's create another table ZSAP_TEAM with same same delivery and technical details.
Maintain the same field name, data element, primary key fields and at last activate the table.

















Step 8. Let's maintain some records in this table also.


















Step 9. All the records created in the table are shown below.


















Step 10. Let's create a elementary search help on table ZJAVA_TEAM. Go to TCODE-SE11, Provide the Elementary search help name and click on create button.
















Step 11. Select the Elementary Search Help radio button and then click on the Tick Button.













Step 12. Provide the short text, Under the Definition tab provide the Table name against the Selection method. Mention the Search help parameter as field 'CRIC_NAME', select the Imp and Exp check box and Provide LPos and SPos values as mentioned below and activate the Elementary search help. Now click on the execute button to test the Search Help.























Step 13. Click on the F4 button and  it display a set of values.





















\Step 14. Again create  elementary Search help, provide the name and click on Create button.
















Step 15. Provide the short text, Under the Definition tab provide the Table name against the Selection method. Mention the Search help parameter as field 'CRIC_NAME', select the Imp and Exp check box and Provide LPos and SPos values as mentioned below and activate the Elementary search help. Now click on the execute button to test the Search Help.






















Step 16. Click on the F4 button and  it display a set of values.
















Step 17. Our two elementary search help is ready, Let's create Collective Search Help.
Provide the Search help name and click on the Create Button.

















Step 18. Select the Collective Search Help Radio Button and click on Tick Button.













Step 19. Provide the Short text . Under the Definition tab, Provide the Search help parameter name and click on the Imp and Exp Check Box. Now Click on the Included search helps tab.

















Step 20. Under the Search help, mention previously created two elementary search help Name .

















Step 21. Now select the first elementary search help and click on the Param. Assignment Button.


















Step 22. Now system automatically  maps the elementary search help reference parameter (CRIC_NAME) to the Collective Search help parameter (NAME) and at last click on Copy button.












Step 22. Now select the second elementary search help and click on the Param. Assignment Button.














Step 24. Now system automatically  maps the elementary search help reference parameter (CRIC_NAME) to the Collective Search help parameter (NAME) and at last click on Copy button.













Step 25. at last Activate the collective search help.

















Step 26. Let's create a report program and declare a parameter and assign the collective search help to it by the keyword 'MATCHCODE OBJECT'. Activate the report and execute it.


















Step 27. Now press F4 button and the collective search help shows the first set of names from the first elementary search help.




















Step 28. Again  click on the second tab of the collective  search help and it  shows the second set of names from the second elementary search help.


















Collective Search help provides multiple ways of data selection and each data selection is created by the elementary search helps added in the Collective search help.

--------------------------------------------------------------------------------------------------------------------------------

Monday 15 July 2013

Creating Lock Object and Using Lock in Program

Step 1. Go to TCODE-SE11, Provide the lock object name and Click on Create Button.



















 

Step 2. Provide the Short text and click on the Tables Tab.















 


Step 3. Provide the table name and Select the Lock mode as Write Lock and Click on the Lock Parameter Tab.




















Step 4. All the primary key fields of the given table are added under the Lock parameter section.
Activate the Lock Object.















 


Step 5. When the lock object is activated it creates two function modules 'Enqueue & Dequeue'.
Navigate along the below shown path to get the generated function modules.
















  


Step 6.  FM names.














 


Step 7. Let's use the generated function module in a program .
Go to TCODE- SE38, provide a report program name and click on create button.

















 


Step 8. Call the Enqueue Function Module to lock the Single record.





















 


Step 9. In the program PF Status Create the Application tool bar button as shown below.














 


Step 10. Activate the report. Open two different session at a time and run the same report.

















Step 11. Provide the CARRID as 'AA' in both sessions.






















Step 12. Run the first session and we have the out put. Execute the same report in second session,
 now we have the error message given below as the same record is locked in first session.



















Step 13. Now again run the same report in two different sessions and provide different inputs and execute it.













 


Step 14. Now no error message is there.







 


Step 15. Now again run the same report in two different session and provide the same input.
Run the program in first session.









  


Step 16. Now the record is locked. Now Unlock the Record By clicking on the Application toolbar button that is created in the program PF Status. Now run the Report in the Second session.












 


Step 17. The same record is shown in the second session without error.






Creation of Help View and Using Help View In Creation of Search Help

Step 1. Go to TCODE- SE11, Select the view radio button and provide the help view name and click on Create Button.












Step 2. Select the Help View radio button and click on Copy button.










Step 3. Provide the short text and in the Tables Section Provide the table Name 'SPFLI' and then click on the Relationships Button.












Step 4. Select the Right Combination 'SPFLI - SCARR' and then click on Copy Button.













Step 5. Based on the common fields The Join Conditions is Filled.









Step 6. Now click on the View Flds Tab and Then click on the Table Fields button.










Step 7. Select the SPFLI table and click on the Choose Button.













Step 8. Select the Appropriate fields and then click on the Copy Button.












Step 9. All the selected fields from the SPFLI table are populated in the view. Again click on the Table Fields Button.










Step 10. Again select the SCARR table and click on the Choose Button.











Step 11. Select the required fields for the Help view and click on the Copy Button.













Step 12. As per the fields selected from two tables, the Help View is populated with fields from two tables and at last Activate the Help View.








Step 13. Now lets Create a search help on the created  Help view. Go to Tcode - SE11, select the Search help radio button, provide the name and click on Create button.











Step 14. Select Elementary Search help radio button nad then click on the Tick Button as marked.










Step 15. Provide the short text and in the Selection Method provide the Help View name created above. In the Search Help parameter section, press F4 button and add all the fields, select the Imp and Exp section, Provide Lpos and Spos numbers and activate the Search Help. At last click on the Execute Button.















Step 16. Press F4 button against CARRID field.













Step 17. Now it shows records consists of fields from two different tables.


Comments system

Disqus Shortname