2020 Jun 20 4:42 PM
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.
2020 Jun 20 5:30 PM
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,2020 Jun 20 5:51 PM
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.
2020 Jun 20 7:28 PM
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.
2020 Jun 21 4:11 AM
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.
2020 Jun 21 6:38 AM
Nice direct database update advice! (calling a non-released function module which does database update without checking its content).
2020 Jun 21 9:11 PM
2020 Jun 23 7:40 AM
Please use the button Comment. The button Answer is only for proposing solutions.
2020 Jun 23 7:51 AM
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!
2020 Jun 23 2:46 PM
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!
2020 Jun 23 2:53 PM
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.
2020 Jun 22 1:09 AM
TX: EMIGALL
for migration Object DEVICE.
This is literally this functionalities purpose, to create / maintain IS-U equipments in significant numbers.
2020 Jun 22 8:14 AM
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.
2020 Jun 22 10:55 PM
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.
2020 Jun 23 8:01 AM
2020 Jun 23 11:10 PM
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.
2020 Jun 24 3:41 PM
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 ?
2020 Jun 25 3:35 AM
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.
2020 Jun 30 1:36 PM
Sandra, we need to see if we are able to acheive our goal. Do not complicate life with unnecessary restrictions like SAP 🙂 lol..