Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

material document

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Hi Dranel,

Have you tried suggested code? Are you facing any problem?

Regards,

Anil Salekar