Infotype creation using table control
Requirement : Create a custom infotype 9007 with 3 fields, Secondary cost centre, start date and end dates.
Approach used: I used transaction PM01.
Passed the screen field values (Secondary cost centre, start date and end dates) to structure p9007 in PAI .
Later Standard sap module post_input_checks will insert the contents of p9007 to table pa9007.
Requirement User has the option of clicking create button (at the end of table control which is created by me) pops up a new screen where secondary cost centre no , start and end dates are entered. Later without pressing save button another set of secondary cost centre no , start and end dates are entered.Now both the entries appear in the table control below. When SAVE is pressed both entries should save in database for the same pernr.
Problem:Since the Standard sap module post_input_checks appears only once in PAI of the below screen , only one record can be inserted to PA9007 before pressing SAVE. Since the requirement is to insert more than 1 cost centre before SAVE, I have commented the Standard sap module post_input_checks and written my own insert statement to insert the table control values into PA9007.
So I need a clarification from u:
Should I comment the Standard sap module post_input_checks and proceed with explicit insert statement or is there any other standard sap code to insert more than 1 record into pa9007 table..
I donu2019t think it is the right approach to comment Standard sap module post_input_checks and write my own code for insertion.I hope the problem is clear. Please reply with ur suggestion .