Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC for "IQ01" Serialized IS-U Equipment running 1000s of Devices - Performance

NTeunckens
Active Contributor
0 Kudos

Hello people

Any pointers on BDC running transactions such as "IQ01" to create IS-U Devices?

We have created such functionality, yet it is a real Performance-drain when running in Mass-scenario (our typical "Mass scenario" is generating 2000-3000 Devices in one Step) looping over a number of pre-determined Serialnumbers and executing the BDC for evey Device in a Synchronous way. This is important, as in Asynchronous way, there is a risk of only generating a certain % of the intended amount of devices, due to locking issues on SAP-Objects etc.

So in this Mass scenario, the input-data is always the same, apart from the SerialNumber (Material, Producer, etc. are all the same) ...

Consider this (pseudo-)Code :

  LOOP AT so_sernr ASSIGNING FIELD-SYMBOL(<sernr>).
    REFRESH: bdcdata,
             lt_bdcmsg.
    CLEAR: lt_bdcmsg.
    PERFORM bdc_dynpro USING  'SAPMIEQ0'               '1000'.
    PERFORM bdc_field  USING: 'BDC_OKCODE'             '/00',
                              'RISA0-MATNR'            material,  "always the same
                              'RISA0-SERNR'            <sernr>-low,
                              'RM63E-EQTYP'            'I'.       "IS-U Equipment
    PERFORM bdc_dynpro USING  'SAPLE10R'               '1100'.
    PERFORM bdc_field  USING: 'BDC_OKCODE'             '=SAVE',
                              'EDEVICED-HERST'         producer,  "always the same
                              'EDEVICED-AB'            sy-datum,  "always the same
*                             'EDEVICED-BAUJJ'         buildyear,
                              'EDEVICED-BESITZ'        '03'.
    PERFORM bdc_dynpro USING  'SAPMIEQ0'               '0101'.
    PERFORM bdc_field  USING: 'BDC_OKCODE'             '=BU'.
    PERFORM bdc_transaction TABLES lt_bdcmsg
                            USING 'IQ01'
                                  'X'
                                  'N'
                                  'S'.      "Sync processing, Async Locking issues

    LOOP AT lt_bdcmsg ASSIGNING FIELD-SYMBOL(<bdcmsg>)
      WHERE msgtyp CA 'EAX'.
      CLEAR return.
      return-type       = <bdcmsg>-msgtyp.
      return-id         = <bdcmsg>-msgid.
      return-number     = <bdcmsg>-msgnr.
      return-message_v1 = <bdcmsg>-msgv1.
      return-message_v2 = <bdcmsg>-msgv2.
      return-message_v3 = <bdcmsg>-msgv3.
      return-message_v4 = <bdcmsg>-msgv4.
      APPEND return TO returntab[].
      EXIT.
    ENDLOOP.
    UNASSIGN <bdcmsg>.
  ENDLOOP.

Any way to optimize this or experience with BatchInput in general or specifically for "IQ01" or "IE01"?

As we need to generate IS-U Equipments, I'm really stuck because of non-existing BAPI's ... Any other Alternatives than BDC?


Thanks for your suggestions

Nic T.

18 REPLIES 18

mateuszadamus
Active Contributor

Hello nic.teunckens

Not really a solution to your issue, but did you check the EQUIPMENT_INSERT, BAPI_EQMT_CREATE, EQUI_CREATE, IBIP_EQUI_CREATE BAPIs? And/or IBIP transaction?

Kind regards,
Mateusz

NTeunckens
Active Contributor
0 Kudos

Thanks mateuszadamus for the suggestion, I will look in to the mentioned FM's.
The "BAPI_EQMT_CREATE" doesn't include some of the IS-U specific data if I recall, so that is not an option. There has always been a lack of complete IS-U BAPI's / FM's relating to Devices.

Anyone has another suggestion OR can offer some help with regards to BDC (any additional info / code that would speed up / clear any buffers or anything)?

Thanks in advance

Nic T.

Sandra_Rossi
Active Contributor

I see in another answer that you may use the transaction code EPRODCUST to create your master data template with subobject DEVICE_INFO, and run it via function module ISU_PRODUCT_IMPLEMENT.

ricky_shaw
Contributor
0 Kudos

Hi Nic,

Once you use 'BAPI_EQUI_CREATE' , you can try the FM: 'ISU_DB_V_EGER_UPDATE' to update the lacking or incomplete data.

0 Kudos

Nice direct database update advice! (calling a non-released function module which does database update without checking its content).

NTeunckens
Active Contributor
0 Kudos

Thanks sandra.rossi for the MDT (MasterDataTemplate) suggestion (and other recommendations) ... I will look into this. I was thinking in that direction as well, yet I'm not very savvy on the use of MDT. But it's a good opportunity to start this as a PoC ...

0 Kudos

Please use the button Comment. The button Answer is only for proposing solutions.

Sorry for that, I always find it confusing that I need to 'comment' at the header-level rather than commenting on your comment but there is no "Comment"-Button for that ...
By the way, your initial "MDT"-suggestion is set as a Comment, which I can not 'Accept' as an Answer ...

Regardless, I feel I need to look into MDT and will try it out!

0 Kudos

Yes it seems to be very difficult to deduce how this forum works. I added an idea to improve "Comment", and there was this other idea to reduce the envy to use "Answer". Use the button "Comment" under your question and add the hyperlinked name of the addressed people (as you do).

I prefer not posting an answer when I just add a link to another question/answer, when I'm unsure if it works (to avoid the effect of many same questions with many answers which all link to other answers and finally nobody knows, it ends in people just being frustrated...) But if you tried and it works, adding your own answer adds much value and is much appreciated!

0 Kudos

I fully agree, Sandra Rossi

I'm going to try both your suggestion as Daniel's suggestion on "IQ04". I will post my experience to complete / finalize this Question.

Thank you, kind regards

Nic T.

daniel_mccollum
Active Contributor
0 Kudos

TX: EMIGALL
for migration Object DEVICE.
This is literally this functionalities purpose, to create / maintain IS-U equipments in significant numbers.

0 Kudos

Hello daniel_mccollum

We also use EMIGALL for Migrations and such, but then it is used as a single action with no links to other processes.

In my "Mass Scenario" we're running Warehouse-Applications where 100s-1000s of Devices will be created upon arrival / GoodsPosting in the Warehouse ... As such, we will create x-number of Devices ànd put them in Stock in one Step (at the click of one Button). Obviously, putting them in Stock can only happen when they're created.

Kind regards

Nic T.

0 Kudos

If you want to embed as a function call, you can model the equipment creation on ISU_M_EQUI_INSERT
or you can use IQ04 to create 1000's of devices for a material with a single Manufacturer etc.

0 Kudos

Thanks for the "IQ04" Suggestion, I will look into it. We hardly have a "single-entry" scenario, only Mass Creation. I haven't though of "IQ04" before so that's a good idea!

So far, the MDT and "IQ04" suggestions seem like valuable Options. I will try both of them to see what works.

I'd tested creating 1000 serial numbers in my test system just to validate the performance characteristics. Took a few seconds, though I didn't take the effort of serializing declaratively.

For the MDT, it can create device info records trivially, however if you are interacting with Full Devices, the MDT framework assumes the equipment must already exist.

0 Kudos

https://answers.sap.com/comments/13077602/view.html
@Daniel_mccollum, what do you mean by "If you want to embed as a function call, you can model the equipment creation on ISU_M_EQUI_INSERT"

Do you want to copy the function ISU_M_EQUI_INSERT or to call it in some code ?


0 Kudos

use it in abap.

      call function 'ISU_M_EQUI_INSERT'
        exporting
          x_direct   = abap_true
          x_commit   = space
        changing
          x_auto     = ls_x_auto
        exceptions
          err_insert = 1
          err_fuba   = 2
          others     = 3.
      lv_subx = lv_subrc = sy-subrc.

fill ls_x_auto as needed by your business process.

its type is isumi_device_auto

which contains V_EQUI EGERS EGERH & classification structures if needed.

ricky_shaw
Contributor
0 Kudos

Sandra, we need to see if we are able to acheive our goal. Do not complicate life with unnecessary restrictions like SAP 🙂 lol..