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 (1)

Answers (1)

yogesh_galphade
Contributor
0 Kudos

Hi

Check this code

//this is bapi instance also you have to initialize in wdinti of comp ctller

input3 = new Z_Emp_Resig_Input(WDModelScopeType.TASK_SCOPE);

//following is table instance add all your value in this ; if you have multiple rows use for loop

Zemp_Resig tab = new Zemp_Resig();

tab.setTransid(requestId);

input3.addT_Employee(tab);

input3.setIt_Flag("9");

wdContext.nodeZ_Emp_Resig_Input().bind(input3);

input3.execute();