2013 May 20 1:22 PM
Hello All,
I am using FM DYNP_VALUES_UPDATE to fill the 'Description' based on some other value after FM f4if_int_table_value_request.
But i am facing the below problem.
data:
lt_dynpread TYPE STANDARD TABLE OF dynpread.
ls_dynpread TYPE dynpread.
ls_dynpread-fieldname = 'GT_YBUT00000KMIA6_D-YORG1'.
ls_dynpread-fieldvalue = ls_return-fieldval.
APPEND ls_dynpread TO lt_dynpread.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog " prog id
dynumb = sy-dynnr " screen no
TABLES
dynpfields = lt_dynpread
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
UNDEFIND_ERROR = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
Please help me how to get the correct 'Description' value against selected value from f4 help.
Thanks,
Sampath
2013 May 20 1:56 PM
since you want to update screen fields in table control you should give index of current line.
use FM "DYNP_GET_STEPL" to get step loop index.
and pass this index.
ls_dynpread-fieldname = 'GT_YBUT00000KMIA6_D-YORG1'.
ls_dynpread-fieldvalue = ls_return-fieldval.
ls_dynpread-stepl = lw_stepl.
APPEND ls_dynpread TO lt_dynpread.
and call 'DYNP_VALUES_UPDATE'.
Hello All,
I am using FM DYNP_VALUES_UPDATE to fill the 'Description' based on some other value after FM f4if_int_table_value_request.
But i am facing the below problem.
data:
lt_dynpread TYPE STANDARD TABLE OF dynpread.
ls_dynpread TYPE dynpread.
ls_dynpread-fieldname = 'GT_YBUT00000KMIA6_D-YORG1'.
ls_dynpread-fieldvalue = ls_return-fieldval.
APPEND ls_dynpread TO lt_dynpread.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog " prog id
dynumb = sy-dynnr " screen no
TABLES
dynpfields = lt_dynpread
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
UNDEFIND_ERROR = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
Please help me how to get the correct 'Description' value against selected value from f4 help.
Thanks,
Sampath
2013 May 20 1:56 PM
since you want to update screen fields in table control you should give index of current line.
use FM "DYNP_GET_STEPL" to get step loop index.
and pass this index.
ls_dynpread-fieldname = 'GT_YBUT00000KMIA6_D-YORG1'.
ls_dynpread-fieldvalue = ls_return-fieldval.
ls_dynpread-stepl = lw_stepl.
APPEND ls_dynpread TO lt_dynpread.
and call 'DYNP_VALUES_UPDATE'.
2013 May 20 1:59 PM
In a table control the LS_DYNPREAD-STEPL (current line index) is a required field in those FM parameters, you can get it when calling FM DYNP_GET_STEPL in the POV, call it just before the F4xx FM.
Regards,
Raymond
2013 May 20 2:40 PM
Hi Sampath,
Try this below code:
DATA:
lt_sel TYPE TABLE OF dynpread,
ls_sel TYPE TABLE OF dynpread.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
ddic_structure = "your_structure_name"
retfield = "field_name"
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = "fieldname"
value_org = 'S'
TABLES
value_tab = "your_internal_table"
return_tab = lt_sel.
READ TABLE lt_sel INTO ls_sel INDEX 1.
IF sy-subrc = 0.
ls_dynpread-fieldname = 'GT_YBUT00000KMIA6_D-YORG1'.
ls_dynpread-fieldvalue = ls_return-fieldval.
APPEND ls_dynpread TO lt_dynpread.
ENDIF.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
TABLES
dynpfields = lt_dynpread.
2013 May 20 2:49 PM
You need to call the FM DYNP_GET_STEPL before calling 'DYNP_VALUES_UPDATE
Check this code.
2013 May 21 2:26 PM
Hello All,
Thank you very much for your quick response.
Now it is working fine.
-Sampath
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |