‎2007 Aug 23 2:41 PM
Hi Floks ,
look in this code
READ TABLE GT_FINAL WITH KEY EBELN = P_SELFIELD-VALUE.
IF SY-SUBRC EQ 0 AND GT_FINAL-BSTYP = 'F'.
SET PARAMETER ID 'BES' FIELD P_SELFIELD-VALUE.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ELSEIF GT_FINAL-BSTYP = 'K'.
SET PARAMETER ID 'VRT' FIELD P_SELFIELD-VALUE.
CALL TRANSACTION 'ME33K' AND SKIP FIRST SCREEN.
ENDIF.
when i doing this in one report ebeln passing to parameter id when case bstyp is F if not when K it's not passing ebeln to parameter id it's going to previous which screen available in default when opening that ebeln its pickuping . so i replaced in place of ME33K to ME33 it's working fine . why its not going to selected ebeln in case of ME33K.
could u please explain in details . any other ways to overcome this problem.
thank you,
Suresh
‎2007 Aug 23 2:59 PM
Hi,
Try to clear the parameter id after it is called by the transaction.
Add an statement to clear the parameter id and then try...
Hey...GT_FINAL has to be 'SPACE' in order to get in to the parameter id 'VRT'.
Just debug it,
U will be able to know...
Cheers,
Simha.
‎2007 Aug 23 3:05 PM
Hi suresh,
1. if you post any code, please mark it using your mouse and then push the 'Code' button.
2. Set your editor settings, pretty print to 'keyword Caps'.
This makes the code readable.
3. READ TABLE GT_FINAL WITH KEY EBELN = P_SELFIELD-VALUE
is totally inefficient. It will cost you precious time if the list is longer. Change it to
READ TABLE GT_FINAL INDEX p_selfield-tabindex.
SET PARAMETER ID 'BES' FIELD gt_final-ebeln.
P_SELFIELD-VALUE stores the number as it is displayed - any leading zeros removed due to output conversion.
p_selfield-tabindex carries the index of your global table passed for display. This means you read the actual table line selected by the user. This works even if the table is sorted or filtered because the table for display is passed by reference and all ALV operations are carried out on the table.
Regards,
Clemens
‎2007 Aug 24 6:11 AM
Hi !
It's not that easy but. ... here we go...
the ME33K is using this:
CHECK RM06E-EVRTN EQ SPACE. "4.0B TK
CASE T160-BSTYP.
WHEN BSTYP-KONT.
GET PARAMETER ID 'CTR' FIELD RM06E-EVRTN.
WHEN BSTYP-LFPL.
GET PARAMETER ID 'SAG' FIELD RM06E-EVRTN.
WHEN SPACE.
GET PARAMETER ID 'VRT' FIELD RM06E-EVRTN.
ENDCASE.
peace of code to determine what parameter ID to select.
If you'd like you could set CTR, SAG AND VRT to be on the save side.
That would work !!
Regards
rainer
Some reward points would be nice ....