2009 Feb 24 8:23 AM
hi
In my program in alv o/p when i select one line of alv and double click on that the transection iw22 is called. there in one field i want to pass data from internal table how it is done any code please forward
hi
In my program in alv o/p when i select one line of alv and double click on that the transection iw22 is called. there in one field i want to pass data from internal table how it is done any code please forward
2009 Feb 24 8:26 AM
Hi,
refer the below code.
PERFORM popscreen USING 'SAPMM06B' '0100'.
PERFORM popfield USING 'EBAN-BSART' fs_header-bsart.(Pass the field through fieldstring.)
PERFORM popfield USING 'EBAN-KNTTP' fs_header-knttp.
CALL TRANSACTION 'IW21' USING t_steps MODE 'A'
MESSAGES INTO t_messages.
FORM popscreen USING value(p_program)
value(p_scrno).
CLEAR t_steps.
t_steps-program = p_program.
t_steps-dynpro = p_scrno.
t_steps-dynbegin = 'x'.
APPEND t_steps.
ENDFORM.
FORM popfield USING value(p_fnam)
value(p_fval).
CLEAR t_steps.
t_steps-fnam = p_fnam.
t_steps-fval = p_fval.
APPEND t_steps.
ENDFORM. " POPFIELD
2009 Feb 24 8:27 AM
get the parameter id from domain of the filed which you want to call on Iw22.
use SET parameter Id coomand to apss value form internal table to field.
if paramter id is not available, Use SUBMIT statement to submit vai selection screen to call IW22.
2009 Feb 24 9:04 AM
Hi,
*&---------------------------------------------------------------------
*& Form USER_COMMAND
*&---------------------------------------------------------------------
FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM
I_SELFIELD TYPE SLIS_SELFIELD.
CASE F_UCOMM.
WHEN '&IC1'.
READ TABLE IT_ALL INDEX I_SELFIELD-TABINDEX INTO WA_ALL.
SET PARAMETER ID 'BES' FIELD WA_ALL-PO_NO.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM. "USER_COMMANDThis code calls transaction ME23N and passes the Purchase Order No. on selecting the specific item.
Also go through this link for a better understanding:
[https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/tutorailABPSimpleALVprogramwithcellcoloring,doubleclickandusageofmacrotocreatefield+catalogue]
Regards.