cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Sales Order using Web Dynpro for java

Former Member
0 Kudos

Hi SDN,

I am new to Web Dynpro for java. I have developed an application for creating a sales order using adaptive RFC Model using BAPI. It's working fine when i create a single order. I wanna create SO with more than one line item. I have used the Table UI Element to do so. But i could not able to enter the 2nd item details. Please suggest me how to pass more than one line item from the Table UI element.

Thanks in advance.

Regards,

Basha

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Lohitha,

Thanks for u'r quick reply. But my intension is to create a Sales Order with "Multiple Line Items" so how can i pass multiple line items as inputs to the BAPI using the Table UI element.I hope you got me.

Regards

Basha

Former Member
0 Kudos

Hi,

Could you please tell me what is ur BAPI import and export parameters.

And your BAPI functionality.

Other wise u can write the functionality in Onlead selection.

Inthe onleadselection capture the table values and pass to BAPI Input.

this might helps.

thanks

Lohi

Message was edited by: Lohitha M

Former Member
0 Kudos

Hi

Create A Table UIElement with the InputField

In step of binding the value to BAPI

for(int i=0;i<wdContext.node<table>().size();i++) {

String ITM_NU=String.valueOf(((IPrivate<ViewName>.I<tableElement>)(wdContext.node<table>().getElementAt(i))).get<param>());

if(!ITEM_NU.equals("")){

//For the input of table structure

ORDER_ITEMS_IN input=new ORDER_ITEMS_IN();

input.setITM_NU();

:

:

//add to the Create Bapi input<CreateSO>.add<OrderItem>(input);

}

}

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Basha,

for(int i=0;i<wdContext.<tablenode>().size;i++)

{

IPrivate<viewname>.I<tablenode>Element e=wdContext.node<tablenode>().get<tablenode>ElementAt(i);

String name=e.get<nameAttrib>();

String no=e.get<noAttrib>();

<Bapiobject>.set<param1>(name);

<Bapiobject>.set<param2>(no);

//execute the Bapi

}

Former Member
0 Kudos

Hi Basha,

Do you need to display the header items and detailed items?

If the BAPI Contains Output values in R/3 side.

I mean to say if BAPI contains 4 line items.u can get thru wdjava the followinf way.

1. Create webdynpro application.

2.Import the model.

3.Create Customcontroller and model binding .

4. Write the execute method in controller.

BAPI b = new BAPI();

WdContext.node<BAPI>.bind(b);

give inputs for BAPI

b.setname(" ");

b.setno("");

wdContext.currentBAPI().modelObejet().execute();

wdContext.node<output>.invalidate(); in try catch

5. create view or when u give the dynpro application its

in the add custom to view and drag BAPI custom to view .

6.Crete UI for ur table thru insertTemplate table directly mapp the output values.

7. deploy and run

U can get the out line items .

Or any thing else post ur requirement.

Thanks

Lohi