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: 

How to create a new order

Former Member
0 Kudos

Hi all,

I want to create an order based on the item number of the order.

I get the data from xml and loop the order and its items, when the item number reaches a number, I want to create another order for the remaining items, how it could be done?

Thanks.

3 REPLIES 3

Former Member
0 Kudos

Hi,

U take counter and try to increase the counter by value 1. If the counter reaches the limit go for creation of new order.

then again u start counter as zero.

Assign points if useful.

Former Member
0 Kudos

Hi,

Whenever u r looping the items, try the code below:

data: g_tabix type sy-tabix.

loop at it_items.

g_tabix = sy-tabix.

call BAPI.

Perform commit.

delete each record from internal table or move the record to another table.

if g_tabix EQ specified.

perform this_operation.

endif.

endloop.

in the form this_operation, again u call the bapi to create new order.

Regards

Kannaiah.

Former Member
0 Kudos

Thanks.

I am not using bapi.