11-20-2008 6:32 AM
I am doing Function Exit for Transaction CO12.
When the Wage Group is initial it should display message like "Enter Shift A/B/C in field Wage Group".
i am getting this one. after display this message screen should go to previous screen ( What we entered data) . I am getting this one but data is clearing and fresh CO12 transaction is opening.
I want that data also.
Please sugget.
Regards
Rami
11-20-2008 6:37 AM
Hi Rami Reddy,
Please go through the function exit clearly.
it will have import and export parameters.
if you want you data to be there,
you have to pass these values back to the export parameters so that the structure gets updated.
Thanks and regards
Ramchander Rao.K
11-20-2008 6:51 AM
11-20-2008 7:08 AM
DATA : GK_AFRUD TYPE AFRUD.
hi i am sending my code.
DATA : GT_AFRUD LIKE GK_AFRUD OCCURS 0.
loop at AFRUD_TAB.
MOVE-CORRESPONDING AFRUD_TAB TO GK_AFRUD.
append GK_AFRUD TO GT_AFRUD.
clear GK_AFRUD.
endloop.
LOOP AT GT_AFRUD INTO GK_AFRUD.
IF GK_AFRUD-LOGRP IS INITIAL.
message 'Enter Shift A/B/C in field Wage Group' TYPE 'I'.
SET SCREEN '0300'.
LEAVE SCREEN.
ENDIF.
ENDLOOP.
Regards
Rami
11-20-2008 7:17 AM
Dear Rami Reddy,
This is a functio Exit.
i don't think you need to use LEAVE SCREEN.
see from the Standard Code of SAP the funtion module will get called and it come to your code, after executing the FM it will contine processing further.
in Function Exits IT is not adviceable to use LEAVE SCREEN or CALL SCREEN unless suggeted by the FM documentation
Most importantly you are using the LEAVE SCREEN with in a loop.
please analyze your code with peace of mind.
regards
Ramchander Rao.K
Edited by: ramchander krishnamraju on Nov 20, 2008 8:18 AM
11-20-2008 7:38 AM
HI.
Please re-check exit parameter may be you need to pass parameter of "Message" back to previous
program.
Sayan.