cancel
Showing results for 
Search instead for 
Did you mean: 

sample code How to set the values to the table attributes in BAPI

Former Member
0 Kudos

hi all

i have one requirement as follows.

there are some attributes in Table which is part is of BAPI. now i want to pass the values to the table attributes in BAPI from webdynpro for java

now i want to hardcode the values to the table attributes in BAPI from webdynpro programming . is it require to create the instance of the table before pass the values to the table attributes.

for example if it is the input parameter we can hardcode the values of that parameter in webdynpro as follows...

wdContext.nodeBapi_Gl_Acc_Getlist_Input().currentBapi_Gl_Acc_Getlist_InputElement().setCompanycode("W100");

now in the same way i want to hardcode the values of table attributes in BAPI from webdynpro for java..

can you please provide the sample code for the same??

is it require to create instance of the table from webdynpro or we can directly hardcode like above as an example??

Regards

Suresh babu

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Go through this thread

Regards

Padma N

Edited by: padma nallapati on Nov 24, 2008 6:16 AM

Former Member
0 Kudos

Hi,

Setting the data to attributes of table is similar to the code you have written.

Create the instance of the table you are trying to pass the data. Please look this thread which clearly explains your question.

Thanks,

Gopi

Former Member
0 Kudos

Hi,

Private<name>View.I<value node name >Node node = wdContext.node<value node name >();

Private<name>View.I<value node name>Element ele;

<your rfc name> input = new <your rfc name>(); // your rfc name

wdContext.node<your rfc name>().bind(input); // bind

<table name> inputTable;

for (int i=0; i < node.size(); i++ ) // value node - where data is available

{

inputTable= new <table name>();

ele = node.get<value node>ElementAt(i);

inputTable.set<Attribute>(ele.get<Attribute>());

......

input.add<table name>();

}

// execute rfc.

hope it clear.

Regards,

ramesh

Former Member
0 Kudos

See the thread below. Hope it helps you