07-22-2015 4:55 PM
Hello experts,
I have tried to call a transaction VLOMVE with HUWBEVENT and HU (EXIDV) but I have gotten a message that is not an input field,
but it is when I enter BWART ( movement type) ? how can I do it while calling a transaction..
REPORT zibo_test1.
DATA: lt_sel TYPE TABLE OF bdcdata,
ls_sel type bdcdata.
CLEAR ls_sel .
ls_sel-program = 'SAPLLE_MOV'.
ls_sel-dynpro = '2000'.
ls_sel-dynbegin = 'X' .
APPEND ls_sel TO lt_sel.
CLEAR ls_sel .
ls_sel-fnam = 'LEMOVHUS-HUWBEVENT'.
ls_sel-fval = '311'.
APPEND ls_sel TO lt_sel.
CLEAR ls_sel .
ls_sel-fnam = 'LEMOVHUS-EXIDV'.
ls_sel-fval = '116'.
APPEND ls_sel TO lt_sel.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
EXPORTING
tcode = 'VLMOVE'
TABLES
using_tab = lt_sel.
This transaction, at the beginning you can enter the BWART and then enter HU which HU(EXIDV) will be active.
Any suggestions please?
Regards
Ibrahim
07-22-2015 5:23 PM
Hi Ibrahim,
Eid Mubarak!!!
Two things:
1. Did you notice you have to press enter after selecting 311 from dropdown. ? Then only the HU field becomes open for input. In your code you are not doing that.
2. Also any dropdown will have a key and value. The "311" is the value but the key is "0006" that you should pass.
So your modified code should be: Lines marked in bold are the changes to your code.
DATA: lt_sel TYPE TABLE OF bdcdata,
ls_sel type bdcdata.
CLEAR ls_sel .
ls_sel-program = 'SAPLLE_MOV'.
ls_sel-dynpro = '2000'.
ls_sel-dynbegin = 'X' .
APPEND ls_sel TO lt_sel.
CLEAR ls_sel .
ls_sel-fnam = 'LEMOVHUS-HUWBEVENT'.
ls_sel-fval = '0006'.
APPEND ls_sel TO lt_sel.
CLEAR ls_sel .
ls_sel-fnam = 'BDC_OKCODE'.
ls_sel-fval = '=TCVG'.
APPEND ls_sel TO lt_sel.
ls_sel-program = 'SAPLLE_MOV'.
ls_sel-dynpro = '2000'.
ls_sel-dynbegin = 'X' .
APPEND ls_sel TO lt_sel.
CLEAR ls_sel .
ls_sel-fnam = 'LEMOVHUS-EXIDV'.
ls_sel-fval = '25116'.
APPEND ls_sel TO lt_sel.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
EXPORTING
tcode = 'VLMOVE'
TABLES
using_tab = lt_sel.
R
07-22-2015 5:00 PM
07-22-2015 5:23 PM
Hi Ibrahim,
Eid Mubarak!!!
Two things:
1. Did you notice you have to press enter after selecting 311 from dropdown. ? Then only the HU field becomes open for input. In your code you are not doing that.
2. Also any dropdown will have a key and value. The "311" is the value but the key is "0006" that you should pass.
So your modified code should be: Lines marked in bold are the changes to your code.
DATA: lt_sel TYPE TABLE OF bdcdata,
ls_sel type bdcdata.
CLEAR ls_sel .
ls_sel-program = 'SAPLLE_MOV'.
ls_sel-dynpro = '2000'.
ls_sel-dynbegin = 'X' .
APPEND ls_sel TO lt_sel.
CLEAR ls_sel .
ls_sel-fnam = 'LEMOVHUS-HUWBEVENT'.
ls_sel-fval = '0006'.
APPEND ls_sel TO lt_sel.
CLEAR ls_sel .
ls_sel-fnam = 'BDC_OKCODE'.
ls_sel-fval = '=TCVG'.
APPEND ls_sel TO lt_sel.
ls_sel-program = 'SAPLLE_MOV'.
ls_sel-dynpro = '2000'.
ls_sel-dynbegin = 'X' .
APPEND ls_sel TO lt_sel.
CLEAR ls_sel .
ls_sel-fnam = 'LEMOVHUS-EXIDV'.
ls_sel-fval = '25116'.
APPEND ls_sel TO lt_sel.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
EXPORTING
tcode = 'VLMOVE'
TABLES
using_tab = lt_sel.
R
07-22-2015 5:29 PM
HI Rudra,
Eid Mubarek too.
yes you are right, of course I have tried it out, and I have written, that the HU input field will be active only if you enter the BWART 311 as an example., I have tried also with SHDB, but I get this issue ok_code = TCVG
so the question, could we do this command OK_CODE as background ;
Regards
Ibrahim
07-22-2015 5:38 PM
Hi again,
I am afraid No.
May be you could call the entire transaction in background by passing MOD_VAL = 'N' ( Or 'E' if you have any error it will stop) in ABAP4_CALL_TRANSACTION.
Part of transaction is background and Part of transaction in foreground is not possible.
I checked the standard transaction code also and we cannot have implicit enhancement also to override what SAP is doing.
R
07-22-2015 5:46 PM
Hi
Thank you, I have tried it out, and now it works by using mode_val = 'E'
CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
EXPORTING
tcode = 'VLMOVE'
MODE_VAL = 'E'
TABLES
using_tab = lt_sel.
Regards
Ibrahim