2023 Feb 15 10:36 AM
Hello Experts, i would like to call a Tcode Z0AVW and there u can but the documentno and itemno
it works but it only jumps into documentno wihtout the item so i have to manuelly looking for the itme number.
this is my code:
SET PARAMETER ID 'AUN' FIELD object-key-salesdocumentno. <br>SET PARAMETER ID 'APO' FIELD object-key-itemno.<br>
CALL TRANSACTION 'Z0AVW' WITH AUTHORITY-CHECK AND SKIP FIRST SCREEN.
2023 Feb 15 12:41 PM
As it's a customer (namespace) transaction, you have to locally analyze how the associated program handle parameter-ids (defined in initial dynpro or read in some report event such as INITIALIZATION)
2023 Feb 15 11:43 AM
Impossible to help as Z0AVW is a Z object (custom).
How did you define the screen fields? What parameter IDs do they have? Are you sure you didn't clear the value?
2023 Feb 15 12:40 PM
the parameter ID in the Tcode Z0AVW are AUN for the documnetno and APO for the itemno
and when i debug the programm it shows me that he got the right documnetno and the itemno as well
and no there is no clear to the value
2023 Feb 15 12:41 PM
As it's a customer (namespace) transaction, you have to locally analyze how the associated program handle parameter-ids (defined in initial dynpro or read in some report event such as INITIALIZATION)
2023 Feb 16 9:54 AM
i tried with patch input and it worked but not quite right here is my code :
DATA: lt_bdcdata TYPE wlf_tt_bdcdata,
ls_bdcdata TYPE bdcdata.
ls_bdcdata-program = 'ZAVW_ENERGIE_MEDIEN_GRID'.
ls_bdcdata-dynpro = '1000'.
ls_bdcdata-dynbegin = 'X'.
APPEND ls_bdcdata TO lt_bdcdata.
CLEAR ls_bdcdata.
ls_bdcdata-fnam = 'BDC_CURSOR'.
ls_bdcdata-fval = 'S_POSNR-LOW'.
APPEND ls_bdcdata TO lt_bdcdata.
CLEAR ls_bdcdata.
ls_bdcdata-fnam = 'BDC_OKCODE'.
ls_bdcdata-fval = '=FC02'.
APPEND ls_bdcdata TO lt_bdcdata.
CLEAR ls_bdcdata.
ls_bdcdata-fnam = 'P_VBELN'.
ls_bdcdata-fval = object-key-salesdocumentno.
APPEND ls_bdcdata TO lt_bdcdata.
CLEAR ls_bdcdata.
ls_bdcdata-fnam = 'S_POSNR_LOW'.
ls_bdcdata-fval = object-key-itemno.
APPEND ls_bdcdata TO lt_bdcdata.
CLEAR ls_bdcdata.
CALL TRANSACTION 'Z0AVW' WITH AUTHORITY-CHECK USING lt_bdcdata
2023 Feb 16 2:44 PM
2023 Feb 16 3:28 PM
2023 Feb 16 3:46 PM
In your code use the SUBMIT statement pattern with the program name, you will get list of available parameters/select-options.
sample
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = 'Z0AVW'
EXCEPTIONS
ok = 0
OTHERS = 4.
iF SY-subrc eq 0.
SUBMIT ZAVW_ENERGIE_MEDIEN_GRID
USING SELECTION-SCREEN 1000
WITH P_VBELN EQ object-key-salesdocumentno
WITH S_POSNR EQ object-key-itemno
AND RETURN.
ELSE.
MESSAGE e172(00) with 'Z0AVW'.
ENDIF.
2023 Feb 16 4:07 PM
thank u so much sir its working now !!!
last question, ist it possible to get in the tcode but in the changing mode?
2023 Feb 17 7:51 AM
nvm, i just read the wiki u sent my error was i called the Tcode without MODE or UPDATE now its shoould look like this:
CALL TRANSACTION 'Z0AVW' WITH AUTHORITY-CHECK USING lt_bdcdata MODE 'E' UPDATE 'A'.
2023 Feb 17 12:37 PM
It is ridiculous to call a Z transaction on a Z program using call transaction and BDCDATA. It is even worse when the Z program is a report program! Do what Raymond suggests and use SUBMIT.
2023 Feb 17 12:44 PM
matthew.billingham i know that and told my boss about that but he wasnt happy with the submit cuz the programm starting in the show mode not changing so he told me to use BDCDATA
2023 Feb 17 3:22 PM
Then add a MEMORY ID pid to the order parameter and item select-option in the called program, so you can use CALL TRANSACTION. (The only case that would actually justify this, apart from the ire/lubia of a chief/customer (*), would be the management of certain authorizations on the transaction, by SU24...)
(*) The customer/Chief is always right-even when they are wrong?
2023 Feb 20 7:40 AM
Change the Z program so it can be called via submit in change mode.
The point is it's a Z program. It can be changed by you!