2010 Jan 11 12:54 PM
Hi everybody,
I'm using bapi BAPI_TRIP_CREATE_FROM_DATA to insert a trip. in case something goes wrong, it saves the BIM in SM35. Sometimes the following error occurs when we try to process the generated BIM: "No batch input data for screen SAPMP56T 1000".
Sounds familiar? OSS does not explicitly state screen 1000 when I look for the error.
Hope you can help!
Kind regards
Laurens
Hi everybody,
I'm using bapi BAPI_TRIP_CREATE_FROM_DATA to insert a trip. in case something goes wrong, it saves the BIM in SM35. Sometimes the following error occurs when we try to process the generated BIM: "No batch input data for screen SAPMP56T 1000".
Sounds familiar? OSS does not explicitly state screen 1000 when I look for the error.
Hope you can help!
Kind regards
Laurens
2010 Jan 11 1:36 PM
try to create the trip manually and check if it is SAPMP56T 1000 where you enter the data.
Some infotypes use different dynpros for different countries, subtypes etc.
2010 Jan 12 9:16 AM
I think I found the problem.
Lets assume the bapi had a functional error and generated a BIM for SM35:
When we create a trip using the bapi BAPI_TRIP_CREATE_FROM_DATA, SAP needs to set the employee number in the first field of PR01 (or PR05 for that matter). In case the employee number in the memory id is different than the one we entered in the BIM, it generates the error of screen 1000. When I process the exact BIM again, the memory ID of the employee number is already correct, therefor the BIM can continue and the error will not occur.
Sound like a bug in the BAPI. It should not hang on the first entry while switching to another employee number.
I'll have a look at OSS again.
Cheers!
Laurens
2010 Jan 12 9:23 AM
Hi,
One option is to use SET MEMORY ID (just before calling the BAPI) and set the value of the field to the same pernr value which will be called inside the BAPI.
regards,
amit m.
2010 Jan 12 9:27 AM
We do this just before we create a trip with the bapi. In case no functional errors occur within the creation of the trip, all goes well. But the problem occurs when there is a functional error. The bapi creates a BIM in the background so you can process it manually. But when the user tries to process this SM35 BIM, the error could occur because the employee number could have changed. This is a bug of the standard BAPI I think.
Cheers!
Laurens
2010 Jan 12 11:22 AM
Got it!
I created an enhancement in include LHRTRF04. Here I added the following code to let SAP set the correct employeenumber in the beginning:
PERFORM bdc_dynpro USING trv_prog '1000'.
PERFORM bdc_field USING 'PTP00-PERNR' p_pernr.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
After this, SAP can continue with the normal BIM.
Cheers!
Laurens