cancel
Showing results for 
Search instead for 
Did you mean: 

Adaptive RFC req to trigger 2 BAPI?

Former Member
0 Kudos

Hi Gurus,

I got a requirement where in which I need to trigger one custom BAPI (ZHR_GET_WORK_SCHEDULES) which will return me half of the work schedule allocated to the particular employee.

Input parameters of the BAPI is Pernr number(Personal Number) where I don't have any Input field in my webdynpro view to enable this input parameter.

When I spoke to business people they said I shouldn'd not put any input field in the webdynpro view......

I have found one more custom bapi(Z_HR_DISPLAY_IT0105) which will return me Pernr number If I pass my portal user id as input?

My question is how to dynamically trigger this BAPI (which will return Pernr Number ) so that I can pass this Pernr as the input for the other custom Bapi whic will return half of the work structure allocated to particular employee........

I have created the webdynpro application to invoke this bapi (which will return half the work structure) ....Now I want to know is there any other way that i can pass the input parameter to this bapi (Pernr) during runtime

Kindly tell me how to implement the above requirement.

Portal user credentials are maintained in ABAP resource.

Please Advice how to go about it?

Thanks in Advance,

Dharani

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can import the second model and execute the bapi.

to get the logged in user use


try {
			IWDClientUser clientUser = WDClientUser.getCurrentUser();
			IUser user = clientUser.getSAPUser();
		} catch (WDUMException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

To pass input structure to a bapi and execution details pl go through

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2brfc

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c2...

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Aiyyaparaj,

You want me to create one more adaptive RFC model to import the other bapi(which will returns me pernr).

Please tell me in detail If possible step by step am new to this webdypro....

and tell me the place where in which I have to trigger the above bapi so that it will dynamically supply the parameter to the next bapi.(which will return the half day work schedule).

and I don't have any action defined in my UI to trigger the first Bapi (which will return me pernr number so that I can pass the paramet dynamically to the second one (whcih will retun me half day workschedule).

Thanks in Advance,

Dharani

Answers (0)