‎2009 Jun 20 11:31 AM
Hi,
I have created a batch upload program to create PR in me51.
the following problems i am facing.
1> for each line item my program is creating a new pr. i am not able to do any looping there to run this. i guess my bdc is wrong or what.?? help.(i am running counter also)
2> I am not able to catch , i mean to display the pr no. which is created there.
3> other thing i want to know that i want to call tcode me51n after me51 to include certain customized portion. can i do that??
please help.
any sample code or tips will be helpful.
‎2009 Jun 20 11:40 AM
Hi,
When you do a recording for your BDC; try to create multiple line items in a PR.
You will understand then how to handle multiple line items.
You will have to make use of step loop.
There will be fields like EBAN-MATNR(01), EBAN-MATNR(02) in your recording.
So the (01) (02) is for the step-loop. This is because of the table control used to add line items.
So incase you want to pass multiple items then your FNAM field in BDCDATA should contain the corresponding field with the step-loop value.
Instead of BDC why not go for a BAPI.
The BAPI 'BAPI_REQUISITION_CREATE' is used to create the purchase requistion. It would be more easier.
Also handling ME51N via BDC will be difficult because of the OOPs concepts used.
Regards,
Ankur Parab
‎2009 Jun 20 11:40 AM
Hi,
When you do a recording for your BDC; try to create multiple line items in a PR.
You will understand then how to handle multiple line items.
You will have to make use of step loop.
There will be fields like EBAN-MATNR(01), EBAN-MATNR(02) in your recording.
So the (01) (02) is for the step-loop. This is because of the table control used to add line items.
So incase you want to pass multiple items then your FNAM field in BDCDATA should contain the corresponding field with the step-loop value.
Instead of BDC why not go for a BAPI.
The BAPI 'BAPI_REQUISITION_CREATE' is used to create the purchase requistion. It would be more easier.
Also handling ME51N via BDC will be difficult because of the OOPs concepts used.
Regards,
Ankur Parab