2015 Aug 05 9:43 AM
Hi,
I need Small information.
I have two Parameters, In My Selection Screen. Both are i need to select value from the Method F4IF_INT_TABLE_VALUE_REQUEST
Values are coming and Everything is fine. Small logic it is having. I am selecting the first parameter . then i come to second parameter.
I need to pass the value parameter of first selection parameter to the second parameter sql query.
Here what i need is After select the first parameter value , I would like to clear the second parameter value (Previously what i selected from f4)
''The below code is for first parameter, Second parameter is also same thing like this.
Below bold color code i used for clear the values for second parameter, If i put the break points values are clearing.
but it is not reflect to the front end means at selection Screen.
Can any body tell me how could i clear the values to the Selection Screen.
I used even selection-screen output also but it is not triggering ,After select the first parameter.
selection screen output is triggering at the time of starting the code.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE P_VBELN.
CLEAR: P_VBELP.
ENDCASE.
ENDLOOP.
Above code not working. Triggers at the time of starting Only.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VBELN.
REFRESH: IT_ERNAM.
SELECT DISTINCT VBELN FROM EKKN INTO TABLE IT_ERNAM.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_vbeln'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_ERNAM
RETURN_TAB = IT_RETURN1
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
P_VBELN = IT_RETURN1-FIELDVAL.
CLEAR: P_VBELP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VBELP.
REFRESH:IT_MATNR.
SELECT DISTINCT VBELP FROM EKKN INTO TABLE IT_MATNR WHERE VBELN = P_VBELN.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_VBELP'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_MATNR
RETURN_TAB = IT_RETURN2
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
P_VBELP = IT_RETURN2-FIELDVAL.
2015 Aug 05 12:37 PM
Hi ,
Here is the solution..Use FM 'DYNP_VALUES_UPDATE' ,
Please the below code in place of 'Clear : p_vbelp' (in bold above) in your code .
DATA : it_dyn TYPE TABLE OF dynpread ,
WA_DYN TYPE DYNPREAD.
WA_DYN-FIELDNAME = 'P_VBELN' .
WA_DYN-FIELDVALUE = it_return1-FIELDVAL.
APPEND WA_DYN TO IT_DYN.
WA_DYN-FIELDNAME = 'P_VBELP' .
WA_DYN-FIELDVALUE = ' '.
APPEND WA_DYN TO IT_DYN.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = it_dyn.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
Regards
DJ
Hi,
I need Small information.
I have two Parameters, In My Selection Screen. Both are i need to select value from the Method F4IF_INT_TABLE_VALUE_REQUEST
Values are coming and Everything is fine. Small logic it is having. I am selecting the first parameter . then i come to second parameter.
I need to pass the value parameter of first selection parameter to the second parameter sql query.
Here what i need is After select the first parameter value , I would like to clear the second parameter value (Previously what i selected from f4)
''The below code is for first parameter, Second parameter is also same thing like this.
Below bold color code i used for clear the values for second parameter, If i put the break points values are clearing.
but it is not reflect to the front end means at selection Screen.
Can any body tell me how could i clear the values to the Selection Screen.
I used even selection-screen output also but it is not triggering ,After select the first parameter.
selection screen output is triggering at the time of starting the code.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE P_VBELN.
CLEAR: P_VBELP.
ENDCASE.
ENDLOOP.
Above code not working. Triggers at the time of starting Only.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VBELN.
REFRESH: IT_ERNAM.
SELECT DISTINCT VBELN FROM EKKN INTO TABLE IT_ERNAM.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_vbeln'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_ERNAM
RETURN_TAB = IT_RETURN1
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
P_VBELN = IT_RETURN1-FIELDVAL.
CLEAR: P_VBELP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VBELP.
REFRESH:IT_MATNR.
SELECT DISTINCT VBELP FROM EKKN INTO TABLE IT_MATNR WHERE VBELN = P_VBELN.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_VBELP'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_MATNR
RETURN_TAB = IT_RETURN2
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
P_VBELP = IT_RETURN2-FIELDVAL.
2015 Aug 05 10:20 AM
hi,
please try it.
PARAMETER : p_vbelp TYPE per_amt MODIF ID gp1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VBELN.
REFRESH: IT_ERNAM.
SELECT DISTINCT VBELN FROM EKKN INTO TABLE IT_ERNAM.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_vbeln'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_ERNAM
RETURN_TAB = IT_RETURN1
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
P_VBELN = IT_RETURN1-FIELDVAL.
if sy=subrc = 0.
LOOP AT SCREEN.
IF screen-group1 = 'GP1'.
CLEAR val.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
endif.
2015 Aug 05 10:47 AM
Thanks for your reply.
Still same problem. I put the break point please have a look on below attached image.
code is triggering. value becomes 0000 . But But it is not reflecting to the front end.
I mean selection screen remains same. What i selected previous value from the F4
Any Information Please update me.
2015 Aug 05 11:27 AM
Hi,
You need to clear the variable P_VBELP at event 'AT SELECTION SCREEN'.
AT SELECTION SCREEN.
CLEAR : P_VBELP.
Thanks.
Regards,
Suniel
2015 Aug 05 11:44 AM
HI,
Thanks for your reply.
I put the code before the value request but it is not firing...
May i know how could i use it.
I seen below thread. They used before the value requested i used the same way but not firing.
At selection-screen.
CLEAR : P_VBELP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VBELN.
REFRESH: IT_ERNAM.
SELECT DISTINCT VBELN FROM EKKN INTO TABLE IT_ERNAM.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'P_vbeln'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_ERNAM
RETURN_TAB = IT_RETURN1
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
P_VBELN = IT_RETURN1-FIELDVAL.
* CLEAR: P_VBELP.
IF SY-SUBRC = 0.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'GP1'.
CLEAR P_VBELP.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = P_VBELN
IMPORTING
OUTPUT = P_VBELN.
2015 Aug 05 11:49 AM
It's firing. Before coming the output .
But i need Once select the first parameter then i need to make it empty.
2015 Aug 05 12:10 PM
Hi,
just add the if condition to check the variable is empty or not.
AT SELECTION-SCREEN.
IF P_VBELN IS NOT INITIAL AND P_VBELP IS NOT INITIAL.
CLEAR : P_VBELP.
ENDIF.
Thanks.
Regards,
Suniel.
2015 Aug 05 12:14 PM
Hi,
Thanks for your reply.
First it is not firing. Before coming the output only it is coming.
I need Once select the first parameter then only i need to validate.
2015 Aug 05 12:37 PM
Hi ,
Here is the solution..Use FM 'DYNP_VALUES_UPDATE' ,
Please the below code in place of 'Clear : p_vbelp' (in bold above) in your code .
DATA : it_dyn TYPE TABLE OF dynpread ,
WA_DYN TYPE DYNPREAD.
WA_DYN-FIELDNAME = 'P_VBELN' .
WA_DYN-FIELDVALUE = it_return1-FIELDVAL.
APPEND WA_DYN TO IT_DYN.
WA_DYN-FIELDNAME = 'P_VBELP' .
WA_DYN-FIELDVALUE = ' '.
APPEND WA_DYN TO IT_DYN.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = it_dyn.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
Regards
DJ
2015 Aug 05 12:44 PM
hi,
Thanks for your reply.
Point Noted. Give me some time i will check it and Update to u.
2015 Aug 05 12:52 PM
Thank u, never heard this type of Function Module.
keep posting.
Thank u.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |