Skip to Content

Introduction

I have often come across several situations in XMII application which are easily manageable and some of them are extremely complex.  These complex scenarios require understanding of ERP and XMII. However, here I would like to illustrate one of the scenarios which I came across while doing MII project.

Scenario

Business would like to submit several related goods in to an operation and get a single confirmation for the operation rather than for each goods.

Subject knowledge
  • JCo Interface

  • Transaction flow

  • Mapping MII objects to structures in BAPI

Technical requirement

In one of our MII project, Requirement was to pass more than one record to BAPI table and get single confirmation Number and Confirmation count. As there are very few threads on this, thought of writing a Blog which could be useful.
Our requirement was to do confirmation of PO/Operation. Each Operation may have one or more component list (materials) associated to accomplish the task. Component list information needs to be passed to GOODMOVEMENTS and LINK_CONF_GOODSMOV table and PO/Operation information to TIMETICKETS table.

This section gives step by step approach on how to map table structure to BAPI, i. e how to add multiple rows to BAPI tables. To Illustrate I have considered standard BAPI, BAPI_PRODORDCONF_CREATE_TT which is mainly used for doing confirmation in SAP.

Let’s see how multiple records are passed to GOODSMOVEMENTS and LINK_CONF_GOODSMOV, single record to TIMETICKETS, and get single confirmation number and count.

ERP System Interface-JCo Interface

Advantage of ERP System Interface- JCo Interface over SAP- JCo Interface.

ERP JCo Interface does all functionality in one single block like:
JCo Start Session,
JCo Function call,
JCo Commit,
JCo End Session.
Hence it avoids many action blocks in transaction. Hence I have taken ERP JCo interface.  

image

 

Approach

Here are the Steps 

1. Create Local/Transaction Parameter of type XML which has similar structure to node items of BAPI table. Say GOODSMOVEMENTS, LINK_CONF_GOODSMOV are two Items shown below which has similar row structure of BAPI table GOODSMOVEMENTS, LINK_CONF_GOODSMOV.

image

2.  Create table nodes which has table structure same as created Items. Below figure shows TableGM and TableLINK_CONF pointing to GOODSMOVEMNETS structure and LINK_CONF_GOODSMOV structure.

image

 

3.  Create Transaction for requirement. Simple Transaction is shown below for explanation.

image

image

 

4.   Transaction has MaterialConfirmationQry_0 block which gets all component list used for Operation( multiple row output data)

 

5.   Repeater_0 is configured to repeat on each row of MaterialConfirmationQry_0.

 

6.  Assignment_0 contains mapping of each repeater row to transaction Items GOODSMOVEMENTS and LINK_CONF_GOODSMOV as shown in below Fig.

 

image

 

7.    Assignment_1 maps these Items to transaction tables as shown in below figure. That is each Item is mapped to transaction TableGM/GOODSMOVEMENTS.Here select Append XML radio button in Link Type, so that each item is added one after other.

image

 

 8.    Finally Tables are now ready with multiple rows.Map this Transaction table to BAPI table in SAP_JCo_Interface_0 block links as shown in below figure. Select Assign XML in Link type while mapping table so that all records are mapped in XML. In below a row is added to TIMETICKETS table of BAPI (select Assign Value radio option for this).

 

image

 

9.    Conditional_4 block contains check for BAPI success.

10.   Conditional_1 block contains check for Return Type of DETAIL_RETURN table is I in BAPI Response. 

11.  Assignment_2 block for assigning transaction output variables with confirmation number, confirmation count, and Message from BAPI Response.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Abesh Bhattacharjee
    Thanks a lot for reviving the content that I had published in my blog
    (Calling a BAPI with a Table as an input parameter from xMII….) for the
    newer version of SAP MII 12.0 my own updates were published in my book
    (Implementing and Configuring SAP MII) so I’m glad you decided to publish a blog. I think these tips will
    go a long way to help SAP MII developers as well as beginners who want
    to use MII to make BAPI/RFC calls involving table structures, also
    great to see new comers taking a step forward to share their
    experiences with the community.

    Good Job

    (0) 

Leave a Reply