*&---------------------------------------------------------------------* *& Form F_GET_LOCATION *&---------------------------------------------------------------------* * Match-code for Return Type *----------------------------------------------------------------------* FORM f_get_location CHANGING p_auart p_lgort. DATA: lc_zrettype TYPE dfies-fieldname VALUE 'ZRETTYPE', lc_value TYPE ddbool_d VALUE 'S', lc_field TYPE help_info-dynprofld VALUE 'P_AUART'. DATA: BEGIN OF ls_zrettype, zrettype TYPE zrettype, END OF ls_zrettype. DATA: li_value_tab LIKE STANDARD TABLE OF ls_zrettype, li_return_tab LIKE STANDARD TABLE OF ddshretval WITH HEADER LINE. DATA: ls_dynpread TYPE dynpread, lt_dynpread TYPE TABLE OF dynpread. * End of Season ls_zrettype-zrettype = TEXT-i01. APPEND ls_zrettype TO li_value_tab. CLEAR ls_zrettype. * Article Recall ls_zrettype-zrettype = TEXT-i02. APPEND ls_zrettype TO li_value_tab. CLEAR ls_zrettype. * Customer Closing ls_zrettype-zrettype = TEXT-i03. APPEND ls_zrettype TO li_value_tab. CLEAR ls_zrettype. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = lc_zrettype dynpprog = sy-cprog dynpnr = sy-dynnr dynprofield = lc_field value_org = lc_value window_title = TEXT-s02 TABLES value_tab = li_value_tab return_tab = li_return_tab EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3. IF sy-subrc EQ 0. READ TABLE li_return_tab INDEX 1. IF sy-subrc IS INITIAL. p_auart = li_return_tab-fieldval. ENDIF. ENDIF. ls_dynpread-fieldname = 'P_LGORT'. CASE p_auart. WHEN 'End of Season'. SELECT SINGLE low FROM tvarvc INTO ls_dynpread-fieldvalue WHERE name = 'ZSDO-OTC0065_STORE_LOC' AND type = 'P'. WHEN 'Article Recall'. ls_dynpread-fieldvalue = 'IC13'. WHEN 'Customer Closing'. ls_dynpread-fieldvalue = 'IC13'. ENDCASE. APPEND ls_dynpread TO lt_dynpread. * Update the dynpro values. CALL FUNCTION 'DYNP_VALUES_UPDATE' EXPORTING dyname = sy-cprog dynumb = sy-dynnr TABLES dynpfields = lt_dynpread EXCEPTIONS OTHERS = 8. ENDFORM. *----------------------------------------------------------------------*
martedì 30 aprile 2019
Aggiornare più campi della stessa dynpro
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento