cancel
Showing results for 
Search instead for 
Did you mean: 

How to use bapi please send me code if possible

Former Member
0 Kudos

Hi,

I am doing some stuff with adobe interactive forms . I am using bapi

' BAPI_REQUISITION_GETDETAIL' . If possible please send me code for that .

Regards,

Gurprit Bhatia

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

if you want work with BAPI, you first must import it.

Go to Java perspective, Package Explorer and press right mouse click

Import... -> Import RFC Modules from R/3

Start with that. After, make you own class and call methods from imported.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Are you doing to display the FNM output in PDF?

Then you need to do the following steps.

this is the automatic way to call the FNM and execute in WD side.following this link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202f1dfb-74db-2910-e48e-a7430c31...

Or manually u need to do means do the following

1) import the model

2) add the model in UsedModel in comp

3) Goto compcontroller create the model node bnding with the model class.

4) go to the init method of the componentcontroller add the following code.

BAPI_REQUISITION_GETDETAIL in = new BAPI_REQUISITION_GETDETAIL ();

wdContext.nodeBAPI_REQUISITION_GETDETAIL().bind(in);

// pass the input params

in.setCustomerNo("102");

//

try{

wdcontext.currentBAPI_REQUISITION_GETDETAILElement().modelObject().execute();

wdContext.nodeOutput().invalidate();

}

catch(Exp e)

{

e.PST();

}

Get the node BAPI_REQUISITION_GETDETAIL from Comp controller to View controller thru context mapping.

After this u can goto ur first view create a ele Interactiveform and add the datasource with node BAPI_REQUISITION_GETDETAIL.

and define a var of type binary in view context and bind with the PDFsource property of the UI Interactive form.

And Open in EDIT mode of the UI Interactive form Element then it opens PDF designer there u can design ur pdf screen and bind with FNM Output values.

This is way u are going to do u require to display ur output in table that require some other procedure.

Thanks,

Lohi.