Application Development and Automation 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: 
Read only

BDC for VA02.

Former Member
0 Likes
1,398

Hello Experts,

I have to do a BDC on VA02 where I have to add new items to the existing sales order.Here my concern is that there would be different number of items for each sales order,so how would I know from which line will i strat adding adding the new items in the table control.Will usuage of sy-tabix help??Can someone help me with this please......I have an urgent requirement.

Rewards assured.

Thanking you in anticipation.

Regards,

Sirisha Matta.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,061

hi Sirisha,

when you record VA02 transaction, click the button for <u><b>CREATE ITEM (the one with PLUS icon, below the table control</b></u>). Then that action will be tracked in the recording and the cursor will come to the appropriate row. You can just enter values there...you dont need to get the number of existing line items, since only the row after the last line item will be now input enabled.

Hope this helps,

Sajan Joseph.

Hello Experts,

I have to do a BDC on VA02 where I have to add new items to the existing sales order.Here my concern is that there would be different number of items for each sales order,so how would I know from which line will i strat adding adding the new items in the table control.Will usuage of sy-tabix help??Can someone help me with this please......I have an urgent requirement.

Rewards assured.

Thanking you in anticipation.

Regards,

Sirisha Matta.

3 REPLIES 3
Read only

Former Member
0 Likes
1,061

when u are adding the new line items to existing sales order it means that u already have the posnr value in VBAP ( sales items ) .

1.

so to add the new line item u have to pick the max posnr value into a variable for a sales order.

suppose say sales order x has 3 line items.

now to add the new item it has to be 3 + 1 .

get this 4 to fill the item and place the cursor accordingly .

03 it will be

000030 + 000010 ---> 000040

and 000050 000060 to follow

2. now to add the first line item new ( add 10 to the line item hope that the posnr count is intervals of 10 )

3. now get the cursor to this place is important .

4. now in VA02 in hte bottom portion there are some buttons like display item detials, add line, delete line , <b>item to top.</b>

this will be a sub screen with item and material.

5. Pick the item to top and fill the new line item value in the item number with the material .

feed this from ur flat file "<-----

6. You need to repeat the process till the line items are over .

and save the so.

Do a recording in this manner and check the result.

You need to make use of this button to fetch the cursor to the line item .

Do a sample recording on va02 with item to top details .

Im working on 4.6c

hope this helps

regards,

vijay.

Read only

Former Member
0 Likes
1,062

hi Sirisha,

when you record VA02 transaction, click the button for <u><b>CREATE ITEM (the one with PLUS icon, below the table control</b></u>). Then that action will be tracked in the recording and the cursor will come to the appropriate row. You can just enter values there...you dont need to get the number of existing line items, since only the row after the last line item will be now input enabled.

Hope this helps,

Sajan Joseph.

Read only

Former Member
0 Likes
1,061

Hi !

You also my use the BAPI BAPI_SALESDOCUMENT_CHANGE wich may be easier than doing BDC to the VA02.

For the docu - check the transaction BAPI .

Regards

Rainer

Some points would be nice if that helped.