2010 Jun 19 8:02 AM
Hi Everyone,
I need to add a validation in a customer_exit.
The transaction is LM07 and customer_exit is LLMGTU01/EXIT_SAPLLMGT_001/ZXMOBU09.
This transaction uses two screens, one source (SAPLXLRF-0212) and one destination (SAPLXLRF-0312). Therefore to make the validation mode of execution on ZXMOBU09, I need to know which screen I'm running, so I can take and read the values of this screen for my validation.
But the issue I'm having is that the screens are not achievables, for example in ZXMOBU09, the values of system variable are sy-dynnr = 1000 and sy-cprog = RLMOB008.
Also, I tried the FM DYNP_VALUES_READ with all possible values:
(RLMOB008-1000)
(SAPLXLRF-0212)
(SAPLLMOB-1212)
in the customer exit, but honestly I got the error invalid dynpro.
I also tried other FM, but the data (w_eval) come in blank, always:
CALL FUNCTION 'GET_DYNP_VALUE'
Exporting
i_field = 'LTAP-VLPLA'
i_repid = 'SAPLLMOB'
i_dynnr = '1212 '
I_CONV_INPUT = ''
I_CONV_OUTPUT = ''
Changing
o_value = W_EVAL. .
CALL FUNCTION 'C14Z_DYNP_READ_FIELD'
Exporting
I_PROGRAM = 'SAPLXLRF'
I_DYNPRO = '0212 '
I_FIELDNAME = 'LTAP-NLPLA'
I_FLG_STEPLOOP = 'X'
CHANGING
E_VALUE = W_EVAL.
Please appreciate your help, as I can access the values of a source dynpro or destination dynrpro from customer exit LLMGTU01/EXIT_SAPLLMGT_001/ZXMOBU09 .
Thanks in advance for your guide! I appreciatte it.
Cheers, Marie!
Hi Everyone,
I need to add a validation in a customer_exit.
The transaction is LM07 and customer_exit is LLMGTU01/EXIT_SAPLLMGT_001/ZXMOBU09.
This transaction uses two screens, one source (SAPLXLRF-0212) and one destination (SAPLXLRF-0312). Therefore to make the validation mode of execution on ZXMOBU09, I need to know which screen I'm running, so I can take and read the values of this screen for my validation.
But the issue I'm having is that the screens are not achievables, for example in ZXMOBU09, the values of system variable are sy-dynnr = 1000 and sy-cprog = RLMOB008.
Also, I tried the FM DYNP_VALUES_READ with all possible values:
(RLMOB008-1000)
(SAPLXLRF-0212)
(SAPLLMOB-1212)
in the customer exit, but honestly I got the error invalid dynpro.
I also tried other FM, but the data (w_eval) come in blank, always:
CALL FUNCTION 'GET_DYNP_VALUE'
Exporting
i_field = 'LTAP-VLPLA'
i_repid = 'SAPLLMOB'
i_dynnr = '1212 '
I_CONV_INPUT = ''
I_CONV_OUTPUT = ''
Changing
o_value = W_EVAL. .
CALL FUNCTION 'C14Z_DYNP_READ_FIELD'
Exporting
I_PROGRAM = 'SAPLXLRF'
I_DYNPRO = '0212 '
I_FIELDNAME = 'LTAP-NLPLA'
I_FLG_STEPLOOP = 'X'
CHANGING
E_VALUE = W_EVAL.
Please appreciate your help, as I can access the values of a source dynpro or destination dynrpro from customer exit LLMGTU01/EXIT_SAPLLMGT_001/ZXMOBU09 .
Thanks in advance for your guide! I appreciatte it.
Cheers, Marie!
2010 Jun 23 6:34 AM
Hi,
If you want to read values of the fields from the transaction which are not accesible in the customer exit you can make use of the field symbols to read these values.
You can perform this as follows.
Field-symbols <fs> type any.
Assign (' (programname)screen field name') to <fs>.
and you can check if the field symbol has a value by checking <fs> is assigned and do the validation in the exit.
In your case.
assign ('(SAPLLMOB)LTAP') to <fs>.
and check <fs>-VLPLA to get LTAP-VLPLA or any field of LTAP will be available in <fs>.
Thanks
Edited by: PawanG on Jun 23, 2010 7:35 AM
2010 Jun 23 4:23 PM
Hi PawanG,
Thanks for answering. Excellent advice , I will take into account for future issues.
Meanwhile as fast solution, I had to provide the following Instruccions to solve the case:
1. Find another customer exit (A) where the fields were accessible.
2. In (A) define a table (Z1) with the fields that need to validate.
3. Use EXPORT Z1 TO MEMORY ID 'Z1' with the fields into (A).
4. Go to customer exit (B), where are not accessible the fields and use IMPORT Z1 FROM MEMORY ID 'Z1'.
5. Read the table Z1 with fields that need to validate.
5. And so was resolved the issue from my side.
Thank you very much for your time and valuable response, I can solve the issue, but definitely the option provided by you is easier ... I appreaciate it .