2010 May 20 7:34 AM
Hello Experts,
In my issue, I have a table control where I have 2 line items and if I select the first line for a call transaction, than the line in the header of internal table only triggers but not the selected line.
Can anyone let me know what can be done in this case.
CASE SY-UCOMM.
WHEN 'LS24'.
ITAB-SEL = 'X'.
LOOP AT ITAB,
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.
SET PARAMETER ID 'WRK' FIELD ITAB-IWERKS.
* SET PARAMETER ID 'LGN' FIELD RL01S-LGNUM.
ENDLOOP.
CALL TRANSACTION 'LS24'. "AND SKIP FIRST SCREEN.
ENDCASEThanks and Regrds,
Nikhil.
2010 May 20 7:42 AM
Use seperate workarea.
CASE SY-UCOMM.
WHEN 'LS24'.
wa-SEL = 'X'.
LOOP AT ITAB into wa where sel = 'X'.
SET PARAMETER ID 'MAT' FIELD wa-MATNR.
SET PARAMETER ID 'WRK' FIELD wa-IWERKS.
ENDLOOP.
CALL TRANSACTION 'LS24'. "AND SKIP FIRST SCREEN.
ENDCASE
Hello Experts,
In my issue, I have a table control where I have 2 line items and if I select the first line for a call transaction, than the line in the header of internal table only triggers but not the selected line.
Can anyone let me know what can be done in this case.
CASE SY-UCOMM.
WHEN 'LS24'.
ITAB-SEL = 'X'.
LOOP AT ITAB,
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.
SET PARAMETER ID 'WRK' FIELD ITAB-IWERKS.
* SET PARAMETER ID 'LGN' FIELD RL01S-LGNUM.
ENDLOOP.
CALL TRANSACTION 'LS24'. "AND SKIP FIRST SCREEN.
ENDCASEThanks and Regrds,
Nikhil.
2010 May 20 7:40 AM
Hi,
Have u added the w/selcolm with name 'ITAB_SEL' in the properties of table control, if not add tat then it will work with the following code
CASE SY-UCOMM.
WHEN 'LS24'.
LOOP AT ITAB where sel = 'X',
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.
SET PARAMETER ID 'WRK' FIELD ITAB-IWERKS.
SET PARAMETER ID 'LGN' FIELD RL01S-LGNUM.
ENDLOOP.
CALL TRANSACTION 'LS24'. "AND SKIP FIRST SCREEN.
ENDCASE
2010 May 20 7:42 AM
Use seperate workarea.
CASE SY-UCOMM.
WHEN 'LS24'.
wa-SEL = 'X'.
LOOP AT ITAB into wa where sel = 'X'.
SET PARAMETER ID 'MAT' FIELD wa-MATNR.
SET PARAMETER ID 'WRK' FIELD wa-IWERKS.
ENDLOOP.
CALL TRANSACTION 'LS24'. "AND SKIP FIRST SCREEN.
ENDCASE
2010 May 20 7:53 AM
H Gautam,
I am not using work area in this report if I need to use work area than i need to completely modify the table control.
Is there any other way I can use such a logic.
Thnks,
Nikhil.
2010 May 20 8:33 AM
Hi nikhil,
just do this in the flow logic Have u added the w/selcolm with name 'ITAB-SEL' in the properties of table control, if not add tat then it will work with the following code
added sel field in the internal table & do the above step it will work there is not much change required
CASE SY-UCOMM.
WHEN 'LS24'.
LOOP AT ITAB where sel = 'X',
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.
SET PARAMETER ID 'WRK' FIELD ITAB-IWERKS.
SET PARAMETER ID 'LGN' FIELD RL01S-LGNUM.
ENDLOOP.
CALL TRANSACTION 'LS24'. "AND SKIP FIRST SCREEN.
ENDCASE
2010 May 20 9:34 AM
Hi,
Yes I have done that. Still issue not solved.
This will trigger if I have only 1 item level but incase I have more than one it takes the only header entry from internal table.
Thanks,
Nikhil.
2010 May 20 10:13 AM
Hi
ITAB-SEL = 'X'. " Just Check in Debug wether this condition is getting satisfied or not
"Then only The TCode is called in your Posted COdeCheck the below thread
in PAI
loop at itab.
module get_cursor.
endloop.
module get_cursor.
get cursor field fnam value fval line tab_line. " Declare these varaibles in TOP Include
endmodule
CASE SY-UCOMM.
WHEN 'LS24'.
wa-SEL = 'X'.
read table ITAB with key sel = 'X'. "or
read table itab index tab_line. " As obtained in the GET_CURSOR module
if sy-subrc = 0.
SET PARAMETER ID 'MAT' FIELD itab-MATNR.
SET PARAMETER ID 'WRK' FIELD itab-IWERKS.
SET PARAMETER ID 'LGN' FIELD itab-lgnum.
CALL TRANSACTION 'LS24'. "AND SKIP FIRST SCREEN.
endif.
"Note: Since LS24 takes only single inputs you dont need to loop itab simple READ table is enough.
"As suggested by MADHU use Row selector on Table control otherwise use GET CURSOR method
ENDCASECheerz
Ram
2010 May 20 11:07 AM
Hi Ram,
Thanks for your assistance issue solved. You rock.
Thanks again,
Nikhil
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |