cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving run time data from BAPI and passing to View Context

Former Member
0 Kudos

Hi,

I have requirement like this,

I have to pass a value from one BAPI to other BAPI and retrieve the value fron second BAPI and display it in the view.

so i used as follows,

//I took output attribute "external id from Bapi_Swn_Uml_Get_Worklist_Inpu().

String external_id = wdContext.nodeBapi_Swn_Uml_Get_Worklist_Inpu().nodeOutput_worklist().nodeWorklist().currentWorklistElement().getExternal_Id();

//I passed to the input field "Im_Wi_Id" of other BAPI "Swk_Wi_Container_Read_Input"

Swk_Wi_Container_Read_Input inputContainer = new Swk_Wi_Container_Read_Input(); wdContext.nodeBapi_Swk_Wi_Container_Read_Inp().bind(inputContainer);

inputContainer.setIm_Wi_Id(external_id);

After this,

I should retrieve values from child node of BAPI "Swk_Wi_Container_Read_Input" for that particular work id.

The child node "Cnt_Elem_Tab" of this BAPI "Swk_Wi_Container_Read_Input" has following fields

Element

ElemLength

Tab_Index

Type

Value

When i tested a some sample value in SAP. I got runtime values in which the about fields are column header

and rows retrieved are

Element ElemLength Tab_Index Type Value

Personnel Number 045 000 00 001452

TripNumber 057 00 000 001456

Stard Date 11 44 00 222

I got totally 14 entries in SAP.

These are run time data. In these I want to retrieve only 3 or 4 datas,

Couls u please guide me , How to retrieve the run time data of BAPI and set the value to the attributes of component controller

and display it in the view.

Regards,

Anitha

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks lot

Former Member
0 Kudos

Hi Anitha,

The Bapis you are using are part of workflow (if I understand correctly) You are reading the data of workitem and only one some attribues of it. That is correct?

I guess you will have to loop over the retrieved data and then put only the data you really want in a new node.

There is no other way, because the workflow api will always return all data.

J

Former Member
0 Kudos

Hello,

I am trying to understand this..... The flow of data is from

BAPI1-> WD Appliacation->BAPI2

Is it?

So basically you are trying to Execute a BAPI, get the info on screen, make some changes and then pass it to BAPI2?

I am not sure if you want to do anything in between.

Please can you clarify?

Thanks

Avik