on 01-23-2014 7:54 AM
Hello experts!
I am trying to automaticly create inspection lot from SAP MII (like executing QA01). I've searched a lot about this in SCN and other resources and figured out the approach that is most popular solution. I need to call the following FMs:
1. QPL1_INSPECTION_LOT_CREATE;
2. QPL1_PDATE_MEMORY;
3. QPL1_INSPECTION_LOTS_POSTING;
4. BAPI_TRANSACTION_COMMIT.
As all listed QPL1 FMs by default are not remote, I've requested our ABAP team to copy them in Z-FMs and make them available for remote calls.
Then I've created MII transaction to call this FMs (we are using MII 14 and JRA connection to call SAP FMs). There are placed the following actions:
1. JRA Start Session;
2. JRA Function - ZQPL1_INSPECTION_LOT_CREATE.
Inputs for QALS_IMP:
Inputs for RMQED_IMP:
QUESTION 1: Is this set fits QPL1_INSPECTION_LOT_CREATE minimum requirements? Or I should add/remove another flags or parameters?
3. Tracer - shows Response{/ZQPL1_INSPECTION_LOT_CREATE/OUTPUT/E_PRUEFLOS}. With listed inputs to ZQPL1_INSPECTION_LOT_CREATE it always returns PRUEFLOS number and SUBRC is always equal to 0 (so I got there no errors). I've noticed the interesting thing: PRUEFLOS number is always increasing. I assume, that lots are actualy created, but I cannot see them in QALS...
4. JRA Function - ZQPL1_UPDATE_MEMORY.
Inputs:
5. JRA Function - ZQPL1_INSPECTION_LOTS_POSTING
There I've tried different inputs for I_MODE:
QUESTION 2: What input should I pass to I_MODE node?
6. JRA Commit;
7. JRA End Session.
This I may approach. I always receive the same result - ZQPL1_INSPECTION_LOT_CREATE/OUTPUT/E_PRUEFLOS shows lot number, but the lot is not saved in QALS. I understand, that all actions should be performed in single LUW. That's why I don't commit action and commint the whole block.
Main QUESTION: Can somebody please help me to figure out what am I doing wrong?
Any replu will be greatly appreciated!
Thank you!
Best Regards,
Vitaliy
I've figured out what was wrong. The listed approach is really correct, but I had troubles in Link Editor for ZQPL1_UPDATE_MEMORY action:
I tried to assign Response{/ZQPL1_INSPECTION_LOT_CREATE/OUTPUT/E_QALS} to Request{/ZQPL1_UPDATE_MEMORY/INPUT/I_QALS}. That caused the problem.. I used stringreplace function to substitute E_QALS by I_QALS. Then XML-assignation worked fine. What a silly mistake..
Anyway, now everything is OK, so I'd like to share my approach with community. To create inspection lot from MII you should build BLS transaction in the following way:
1. JRA Start Session - start LUW in SAP ERP;
2. JRA Function - QPL1_INSPECTION_LOT_CREATE.
Inputs for QALS_IMP:
Inputs for RMQED_IMP:
3. JRA Function - QPL1_UPDATE_MEMORY.
Inputs:
4. JRA Function - QPL1_INSPECTION_LOTS_POSTING
No inputs required.
5. JRA Commit - commit LUW actions;
6. JRA End Session - end LUW in SAP ERP.
Inpsection lot number will be returned in Response{/QPL1_INSPECTION_LOT_CREATE/OUTPUT/E_PRUEFLOS}. As a result you will find that number in QA03 t-code.
Hope this would help somebody 🙂
Best Regards,
Vitaliy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.