04-25-2006 10:13 AM
hai,
i have an alv report which displays ebeln,ebelp.
now if i click on ebelp,it has to pass the corresponding MATERIAL NUMBER
(MATNR) to the screen MM03.
I USE THE FOLLOWING CODE FOR HYPERLINK to pass ebelp but i matnr to b placed,
IF RS_SELFIELD-SEL_TAB_FIELD = 'ITAB-EBELP'.
SET PARAMETER ID 'MAT' FIELD RS_FIELD.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN
04-25-2006 10:18 AM
Try this:
IF RS_SELFIELD-SEL_TAB_FIELD = 'ITAB-EBELP'.
<b>READ TABLE ITAB INDEX RS_SELFIELD-TABINDEX.
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.</b>
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN
Hope this helps.
Sudha
04-25-2006 10:18 AM
Try this:
IF RS_SELFIELD-SEL_TAB_FIELD = 'ITAB-EBELP'.
<b>READ TABLE ITAB INDEX RS_SELFIELD-TABINDEX.
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.</b>
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN
Hope this helps.
Sudha
04-25-2006 11:20 AM
04-25-2006 10:24 AM
Hi,
Check out if there is any function module for the same.
I had a similar requirement wherein I had to take the user to the activity transaction if he clicks on any of the rows in the ALV by means of the Activity Number.
The function module for this was ECRM_ISU_DISPLAY_ACTIVITY.
You can search for similar function modules by search pattern Display in SE37.
When the user clicks on any of the rows, capture the Row ID for that row and for that row id get the material number and pass to this function module.
I am sure there would be one FM for this purpose.
<b>Use the FM BAPI_MATERIAL_DISPLAY</b> for this purpose.
It takes you to the desired transaction.
Please reward some points if it helps.
Regards,
Amit Mishra
Message was edited by: Amit Mishra
04-25-2006 10:30 AM
Hi ,
change your code this way....
IF RS_SELFIELD-SEL_TAB_FIELD = 'ITAB-EBELP'.
READ TABLE IT_EKPO INDEX RS_SELFIELD-TABINDEX.
if sy-subrc = 0. "if you have matnr in your itab then
"leave this select
"directly use itab-matnr instead of
"l_matnr
select single matnr from ekpo
into l_matnr
where ebeln = itab-ebeln
and ebelp = itab-ebelp.
SET PARAMETER ID 'MAT' FIELD l_matnr.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN
Regards
vijay