cancel
Showing results for 
Search instead for 
Did you mean: 

How to add more than one line items to the sales order in Webdynpro?

Former Member
0 Kudos

I have created a webdypro component to create a sales order..I am using a bapi for this..

the selection screen for WD contails the following:

For Header DATA:

1. Order Type

2.


For ITEM Data:

1. Item, Mat.no, Target Quantity, Ner VAlue, Plant

When i give the data for the Header field and add an item details and click on create, Sales order is getting createed perfectly,

BUT IF I add more than 1 line items.. NO SALES ORDER IS GETTING CREATED..............

if i loop the items data.. pointer is not getting inside the loop and it just comes out of loop..

Plz help.....

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos
Former Member
0 Kudos

Hi Vijay,

I referred the same code and did my object but please tell me how do i alter this in order to create a sales order for more than one line item, ??

as of now i can create an sales order with only one line item

Former Member
0 Kudos

Hi Vijay & harsha,

It is working fine for i.e sales roder is getting created with i add only one line item but when i add more than one line item it not creating..


cardinality is 0 to n.


Also, please send me the sample code how to process the multiple line items.


Thanks,

LUCIFER

harsha_jalakam
Active Contributor
0 Kudos

Hi Lucifer,

Please check the cardinality of the line items node, it must be 1.N, as there must be at least 1 line item, associated with a header data. Even though after correcting cardinality if you are creating with multiple line items sales order is not getting created, please the parameter return(bapiret2), from the FM, which gives you the information why sales order was not created.

Regards,

Harsha

Former Member
0 Kudos

Hi,

check the cardinality for the ITEM context?

Check the loop condition whether you are passing Sales order number in the where field as well as you are capturing the sales order number  value in Item field also..

Regards,

Vijay