cancel
Showing results for 
Search instead for 
Did you mean: 

Read R/3 table in Webdynpro

Former Member
0 Kudos

Dear Sir/Madam,

I would like to know how to read an R/3 customized table in Webdynpro during run time.

Thanks a lot !

Patrick Cheung

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I have created the RFC and the model in Webdynpro, and the necessary bindings (context & model) have been done.

The final part is to call this RFC in Webdynpro which will return one field from an R/3 table.

Instead of hard coding the string stored in the parameter <b>URL</b> as follows, the new RFC was created to read this parameter from a customized table in R/3 and then return and store in <b>URL</b>.

My problem is... I do not know how to put coding in this function in order to call the RFC and store the return value.

Your help is highly appreciated !

Thanks a lot !

Patrick Cheung

private final void buildURL_toITS() {

String userID = "";

String passwd = "";

String empID = wdContext.currentRFCInputParametersElement().getI_Employeenumber();

String tripNO = wdContext.currentRFCInputParametersElement().getI_Tripnumber();

String url_userID = "&sap-user=" + userID;

String url_passwd = "&sap-password=" + passwd;

String <b>URL = "http://ebpshd01.corp.clp.com.hk:8000/sap/bc/gui/sap/its/zhr162?sap-client=100"</b>

+ url_userID + url_passwd + "&~transaction=ZHR162&PERNR="

+ empID + "&REINR=" + tripNO + "&~okcode=ONLI";

wdContext.currentContextElement().setURL(URL);

}

Message was edited by: Patrick Cheung

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

Check with my previous answer for how to call the RFC i.e. execute RFC steps.

1)Create instance

2)Bind it

3)Execute it.

Regards,

Vijayakhanna

Answers (4)

Answers (4)

Former Member
0 Kudos

Dear all,

Thanks very much for your help and the problem solved !

Woo... it is quite difficult for me !

Thanks !

Patrick

Former Member
0 Kudos

HI

GOOD

GO THROUGH THIS LINK

/people/sap.user72/blog/2006/05/04/enhancing-tables-in-webdynpro-java-150-custom-built-table-utilities

THANKS

MRUTYUN

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

U need to have a BAPI and Import in to webdynpro through Adaptive RFC Model.Add it in the used model.

Then map it to the controller and the respective views.

Then Execute the BAPI through code.

Steps to execute:

1. First create an instance for bapi and bind the instance to the bapi node.

Z<bapi name> zb=new Z<bapi name>();

wdContext.nodeZ<bapi name>. bind(zb);

2. Then if u have the import parameter u have to set them by using

The instance of the above bapi.

Zb.set<import parameters>;

3. If the bapi has a table parameters then the structure for the table parameters will also be imported

In the model class.

4. Set the table parameters by creating the instance for that structure and using this instance set it.

Z<Struct>itm tab=new Z<Struct>();

Tab.set<table parameters>

5. Then add the structure instance to the bapi instance.

Zb.add(Tab);

6. Then Execute the bapi after setting the import parameters.

7. If there is any export parameters, then get the values after execution.

Best Regards,

Vijayakhanna Raman

Sharadha1
Active Contributor
0 Kudos

Hi Patrick,

You have to use RFC's that are present to read the R/3 Customizing table. This can be done by creating a model in webdynpro.

Regards,

Sharadha