cancel
Showing results for 
Search instead for 
Did you mean: 

IRPT page to show results from a RFC

Former Member
0 Kudos

Hi masters, I am a java and webdynpro java developer, now I am developing in xMII 12.2.


I have already created the IRPT page on a HTML editor, I have put the HTML code in the IRPT file in SAP xMII workbench, now according with a parameter that the user will enter in a field and press a button I have to execute a BAPI in SAP ECC and display this results.


Its been so dificult to find a tutorial focused on the scenario that I have to develop, or maybe I could still don´t know how to find what I need.


Could you help me with some specific tutorial for this scenário ?

In order to reach this results, I proceeded like this:


I´ve created a transaction with two sequences, one with a SAP STRT Action and another with a SAP FUNC action, so I´ve executed and debugged the BAPI, its working well and the results are returned by the BAPI. After this I have created a XacuteQuery to execute this transaction, I have tested that and it worked, now please I need to know if it is the correct development objects to my scenário and how to put it to work in the IRPT page.


Any helpful answer will be awarded.

Accepted Solutions (1)

Accepted Solutions (1)

agentry_src
Active Contributor

Hi Michel,

There are several projects which were developed for 11.5 and updated to at least 12.1 which are based upon the same basic concept you have.  They cover a variety of ERP areas (PP, MM, PM, etc.).  Please check the documents for SAP MII to see if these will help.  If you have problems finding them, let me know and I will see if I can find them.  I would recommend downloading the entire project, but the MM or QM ones will probably best suit your needs.

Regards, Mike

Former Member
0 Kudos

Tks Michael, so as you said I am facing problems to finding the projects, could you see if you can find them, please ?

agentry_src
Active Contributor
0 Kudos

Hi Michel,

I finally found them.  Navigation is as straightforward and direct as it was in the old SDN (in other words it is not either straightforward or direct).  But here you go.  I am referring to the first project download on the page link

Former Member
0 Kudos

thank you Michael Appleby , I've downloaded the samples.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Add Document action block from SAP MII XML Output category and configure the columns you want to display. Repeat on each item you want  from the results you obtained from BAPI and add row action block from the same category and give links properly in the transaction.

Regards,

Naresh.

Former Member
0 Kudos

Tks Naresh, I am following your instructions, do you have any print-screen, tutorial or any sample that you could share with me ?

Former Member
0 Kudos

I hope these screens helps.

Regards,

Naresh.

Former Member
0 Kudos

Tks Naresh, please could you share this document with me ? the file TPMII1Labs_07102007_Final ?

aravinth_anandhan
Active Participant
0 Kudos

Hi Michel,

As per my understanding, you created Transaction and for that transaction you created an Xacute Query. And also you prepared IRPT page as per ur requirment.

Now you can create an iGrid for your Xacute query to make your transaction execute from IRPT page.


Regards,

Aravinth

Former Member
0 Kudos

Tks Aravinth, but I can not use iGrids, because of the layout of my web page, I need to fill out each HTML field with the RFC results, so please how can I execute my query (RFC) in this way ? and how can I fill out the HTML tags input ?

<input type="text" value="Kg" style="width:60" class="campoGrandeUnidMedida" value="????">

aravinth_anandhan
Active Participant
0 Kudos

Hi Michel,

Get your RFC output in a document. To do this, Add one Document action block in top or with ur Jco interface action block and add required fields in Document. Add a Repeater action block under ur Jco interface action block and map ur RFC response to repeater. Now add one Row action block under Repeater, go to configure objects and select Document's output.

Now if you go to the configure links in Row action block, you ll see the fields which you created in Document action block. Then map the repeater's output to Row action block.

Till this step we are having RFC's output in Document. Then create one XML type output variable in Transaction properties.

Add one assignment Action block in next sequence and map ur document output to XML type variable in transaction properties.

After completion of all these steps, create an iGrid for your xacute query. And create an applet in your irpt page(inside body) like this,

<APPLET NAME="MyApplet" CODEBASE="/XMII/Classes" CODE="iGrid" ARCHIVE="illum8.zip" WIDTH="1" HEIGHT="1" TABINDEX=1 MAYSCRIPT>

<PARAM NAME="QueryTemplate" VALUE="Your Xacute query path">

<PARAM NAME="DisplayTemplate" VALUE="Your iGrid path">

<PARAM NAME="InitialUpdate" VALUE="false">

</APPLET>

And add this code inside script,

  

document.MyApplet.getQueryObject().setParam(1, your input variable);

document.MyApplet.updateGrid(true);

I assumed for one input variable, so i am passing here only one input. If you have more than one input, you mention accordingly.

RFC_Result=document.MyApplet.getGridObject().getCellValue(1,1);

Finally we got our RFC output in our irpt page. Assume my text box id is TXT1. I ll use the below code to pass the value to my text box in irpt page.

document.getElementById("TXT1").value=RFC_Result;

Here i assumed my iGrid is having only one column, so i mentioned getCellValue(1(for Row),1(for Column)).

Regards,

Aravinth

Former Member
0 Kudos

Tks Aravinth Anandhan, your message solved my problem. For another reasons I coun´t use the iGrid Applet, but the grid was displayed with html table, js and ajax, thank you so much.

Now I am facing a next problem, the transaction results appear to saved in a kind of cache, so when I execute them twice the second calling are not working, so it not call the respective RFC.

Is it a cache ? the transactions called by the xAcuteQueryes are not executed all the times ?

agentry_src
Active Contributor
0 Kudos

Hi Michel,

Please open a new thread for the new topic regarding XacuteQuerys and complete this one if you are satisfied that you have an answer.

Thanks, Mike (wearing my moderator hat now)

Former Member
0 Kudos

Hi Michael, you said that I have to complete this topic, but I still didn´t find the button "mark as answer" that we have before on the last layout of this forum

Former Member
0 Kudos

ops... the button was "mark as answered"