07-31-2009 1:38 AM
HI Guru's,
Good Morning,
I have a question., y every time i uploaded my batch input it will produce many material document even in one document header??.,
What can i do to make one mat doc whenever i do my batch input.
Please help.
thank you..
Regards,
dranel
07-31-2009 5:46 AM
Hi Dranel,
You might be calling the transaction for every reocrd, so it is creating multiple material documents for same header data.
I am giving following pseudo code as an sample .
sort it_data by header fileds item fields.
LOOP AT it_data INTO wa_data.
wa_output = wa_data.
AT NEW last header field.
Populate Header field data.
ENDAT.
AT END OF last header field.
CALL TRANSACTION.
ENDAT.
Normal common screen population.
ENDLOOP.
You have to do recording properly so that you can use above program structure.
Regards,
Anil Salekar
07-31-2009 6:12 AM
Hi,
Problem seems with the SAVE code used by you within LOOP.
Whenever a save executes, a document gets generated.
So try SAVE code outside the loop. May be it works as I don't know for which T.Code you are executing the BDC.
Regds,
Anil
08-05-2009 4:05 AM
Hi Dranel,
Have you tried suggested code? Are you facing any problem?
Regards,
Anil Salekar