04-03-2019 2:49 PM
Hello ,
Aftere execution function 'MIGO_DIALOG' i need to select data from MKPF table usin values in parameters
MBN and MJA as key fields ( mkpf-mblnr for mkpf-mblnr).
Problem is that selection gives results ONLY in debuge mode.
When I run the program (without break points) data is NOT selected
Please advice
-code
GET PARAMETER ID 'MBN' FIELD gv_mblnr.
GET PARAMETER ID 'MJA' FIELD gv_mjahr.
SELECT SINGLE * FROM mkpf INTO ls_mkpf
WHERE mblnr = gv_mblnr
AND mjahr = gv_mjahr .
04-03-2019 3:49 PM
(The MIGO dialog is executed in another LUW and use a COMMIT AND WAIT as almost every SAP transaction)
You have to wait until the update task are run and database buffer are updated (FAQ)
04-03-2019 3:49 PM
(The MIGO dialog is executed in another LUW and use a COMMIT AND WAIT as almost every SAP transaction)
You have to wait until the update task are run and database buffer are updated (FAQ)
04-17-2019 8:31 PM
To avoid waiting an arbitrary number of seconds, you may tell the system to do the updates synchronously (they are asynchronous by default), by using a batch input with the parameter UPDATE 'S' or OPTIONS FROM with ctu_params-updmode = 'S'. That way, all COMMIT WORK will be considered as being COMMIT WORK AND WAIT. For example :
DATA ctu_params TYPE ctu_params.
DATA bdcdata TYPE TABLE OF bdcdata.
ctu_params-updmode = 'S'. " synchronous updates
CALL TRANSACTION '...' USING bdcdata OPTIONS FROM ctu_params.
In your case, you may create a custom transaction code which calls MIGO_DIALOG. You do a CALL TRANSACTION as above + ctu_params-dismode = 'E' because MIGO_DIALOG displays screens, and you must use RACOMMIT because maybe the Save action does more than one COMMIT WORK:
ctu_params-dismode = 'E'. " keep screen displayed
ctu_params-racommit = 'X'. " continue after first COMMIT
Note that you pass an empty BDCDATA internal table to USING.
04-16-2019 2:18 PM
Hello ,
Thank you for answer. What I need to do is after migo is done and material document is created
I want to continue with processing in Z program. The problem is when I set function parameter
i_leave_after_post = 'X'. The flow gets out migo straigth after execution of 'MIGO_DIALOG' so it doesn't get to logic I developed .
I other case when parameter i_leave_after_post in BLANK , user needs to hit the 'BACK' button to continue fow.
I didi try with user exits after ( posting is done in migo and material document is created) ,but all of them comes in execution after creation of material document but BEFORE comit is done.
So marterial documen, that I ma suposed to use in my program is not valid .
04-16-2019 2:44 PM
I Agree with Raymond Giuseppi, U need to wait till tables are getting updated. When you execute in debug mode, program will have sufficient time to update tables.
Please get me more details, I have done such requirement.
04-17-2019 8:11 AM