on ‎2022 May 26 11:16 AM
Hello everyone,
My requirement in function module is to call transaction code WSOA2 in order to add stores(WRSZ-LOCNR) to existing assortments(WRS1-ASORT).
This is my first time I am asking for FM, that is why a more clear answer would be appreciated. However, it is not neccessary.
I hope my question is clear.
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi
You may try with the BAPI - BAPI_ASSORTMENT_MAINTAINDATA . Open the bapi SE37 - the FM documentation may help you further
CALL FUNCTION 'BAPI_ASSORTMENT_MAINTAINDATA' "Maintenance of Assortments
EXPORTING
assortment = " bapie1wrs1
assortmentx = " bapie1wrs1x
IMPORTING
return = " bapiret2
* TABLES
* materialgroup = " bapie1wrs6
* materialgroupx = " bapie1wrs6x
* description = " bapie1wrst
* descriptionx = " bapie1wrstx
* assortmentusers = " bapie1wrsz
* assortmentusersx = " bapie1wrszx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
venkateswaran.k
Am I doing everything correctly? If yes, then program does not write my entries and not even giving any errors.
DATA:
ld_return TYPE bapiret2,
it_assortmentusers TYPE STANDARD TABLE OF bapie1wrsz, "TABLES PARAM
wa_assortmentusers LIKE LINE OF it_assortmentusers,
it_assortmentusersx TYPE STANDARD TABLE OF bapie1wrszx, "TABLES PARAM
wa_assortmentusersx LIKE LINE OF it_assortmentusersx,
ld_assortment TYPE bapie1wrs1,
wa_assortment LIKE ld_assortment,
ld_assortmentx TYPE bapie1wrs1x,
wa_assortmentx LIKE ld_assortmentx.
LOOP AT mt_info INTO ls_info.
wa_assortment-assortment = ls_info-asort.
wa_assortmentx-assortment = 'X'.
wa_assortmentusers-seqnumber = '5'.
wa_assortmentusers-customer_site = ls_info-locnr.
wa_assortmentusers-salesorg = ls_info-vkorg.
wa_assortmentusers-distr_chan = ls_info-vtweg.
wa_assortmentusersx-seqnumber = 'X'.
wa_assortmentusersx-customer_site = 'X'.
wa_assortmentusersx-salesorg = 'X'.
wa_assortmentusersx-distr_chan = 'X'.
APPEND wa_assortmentusers TO it_assortmentusers.
APPEND wa_assortmentusersx TO it_assortmentusersx.
ENDLOOP.
CALL FUNCTION 'BAPI_ASSORTMENT_MAINTAINDATA'
EXPORTING
assortment = wa_assortment
assortmentx = wa_assortmentx
IMPORTING
return = ld_return
TABLES
* MATERIALGROUP =
* MATERIALGROUPX =
* DESCRIPTION =
* DESCRIPTIONX =
assortmentusers = it_assortmentusers
assortmentusersx = it_assortmentusersx.
WRITE: ld_return-message.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
venkateswaran.k
Yes, I have debuged. In ld-return, there is nothing written. My programm should append new markets to an assortment. So, I am passing assortment(ASORT), market(LOCNR) and two more fields. Everything seems to be written to internal tables,but nothing is written to the tables. What may be the reason for this? And what should I share, for better understanding?
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.