<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: F4 help Value request in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-value-request/m-p/1920845#M382589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this sample 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables: mara, makt.

data: begin of itab occurs 0,
matnr like mara-matnr,
end of itab.


data : begin of btab occurs 0,
maktx like makt-maktx,
end of btab.

data mak like makt-maktx.

DATA : return like ddshretval occurs 0 with header line.

data: begin of dynpfields occurs 0.
include structure dynpread.
data: end of dynpfields.

parameters: p_matnr like mara-matnr,
p_maktx like makt-maktx.

Initialization.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.

REFRESH ITAB.
SELECT matnr FROM mara INTO TABLE ITAB.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR '
dynprofield = 'P_MATNR '
dynpprog = sy-REPID
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = ITAB
return_tab = return.

select single maktx from makt into mak where matnr = return-fieldval.

p_matnr = return-fieldval.

refresh return.
clear return.

move 'P_MAKTX' to dynpfields-fieldname.
move mak to dynpfields-fieldvalue.
append dynpfields.


CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
      dyname               = sy-cprog
      dynumb               = sy-dynnr
    TABLES
      dynpfields           = dynpfields
    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 &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

refresh return.
clear return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Feb 2007 10:06:36 GMT</pubDate>
    <dc:creator>anversha_s</dc:creator>
    <dc:date>2007-02-24T10:06:36Z</dc:date>
    <item>
      <title>F4 help Value request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-value-request/m-p/1920843#M382587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear all ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using the code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data : begin of i_bidst OCCURS 0,&lt;/P&gt;&lt;P&gt;       bidstd(10) type c ,   ( DEFINED BY ME)&lt;/P&gt;&lt;P&gt;       bidst like zvesim-bidst,  ( DATA DICTIONARY FIELD)&lt;/P&gt;&lt;P&gt;       end of i_bidst.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_bidst-bidst = 'A'.&lt;/P&gt;&lt;P&gt;  i_bidst-bidstd = 'APPROVED'.&lt;/P&gt;&lt;P&gt;  append   i_bidst.&lt;/P&gt;&lt;P&gt;  i_bidst-bidst = 'R'.&lt;/P&gt;&lt;P&gt;  i_bidst-bidstd = 'REJECTED'.&lt;/P&gt;&lt;P&gt;  append i_bidst.&lt;/P&gt;&lt;P&gt;  i_bidst-bidst = 'S'.&lt;/P&gt;&lt;P&gt;  i_bidst-bidstd = 'SUBMITTED'.&lt;/P&gt;&lt;P&gt;  append i_bidst.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BIDST.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            RETFIELD    = 'BIDST'&lt;/P&gt;&lt;P&gt;            DYNPROFIELD = 'P_BIDST'&lt;/P&gt;&lt;P&gt;            DYNPPROG    = SY-CPROG&lt;/P&gt;&lt;P&gt;            DYNPNR      = SY-DYNNR&lt;/P&gt;&lt;P&gt;            VALUE_ORG   = 'S'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            VALUE_TAB   = I_BIDST.&lt;/P&gt;&lt;P&gt; the internal table consists of data what i had appended.&lt;/P&gt;&lt;P&gt;I want to know how display both the fields on value request but the selection field is DICTONARY field only For Description only I am using the user defined field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;balaji.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Feb 2007 09:50:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-value-request/m-p/1920843#M382587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-24T09:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help Value request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-value-request/m-p/1920844#M382588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;parameters: p_bukrs(4) type c,
            p_butxt(50) type c.

data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.

at selection-screen on value-request for p_bukrs.

  call function 'F4IF_FIELD_VALUE_REQUEST'
       exporting
            tabname           = 'T001'
            fieldname         = 'BUKRS'
            dynpprog          = sy-cprog
            dynpnr            = sy-dynnr
            dynprofield       = 'P_BUKRS'
       tables
            return_tab        = return
       exceptions
            field_not_found   = 1
            no_help_for_field = 2
            inconsistent_help = 3
            no_values_found   = 4
            others            = 5.

  read table return with key fieldname = 'P_BUKRS'.

* Add it back to the dynpro.
  dynfields-fieldname = return-retfield.
  dynfields-fieldvalue =  return-fieldval.
  append dynfields.

* Get the company code from db and add to dynpro
  dynfields-fieldname = 'P_BUTXT'.
  select single butxt into dynfields-fieldvalue
          from t001
                where bukrs = return-fieldval.
  append dynfields.

* Update the dynpro values.
  call function 'DYNP_VALUES_UPDATE'
       exporting
            dyname     = sy-cprog
            dynumb     = sy-dynnr
       tables
            dynpfields = dynfields
       exceptions
            others     = 8.

start-of-selection.

Refer this too
F4IF_INT_TABLE_VALUE_REQUEST
       This FM is used to dsiplay values stored in an internal table as input
help.This FM is used to program our own custom help if no such input help
exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB. 
       If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
 
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            RETFIELD           = field from int table whose value will be returned 
            DYNPPROG        = SY-CPROG
            DYNPNR             = SY-DYNNR
            DYNPROFIELD    = 'screen field'
            VALUE_ORG       = 'S'
       TABLES
            VALUE_TAB        = internal table whose values will be shown.
            RETURN_TAB      = internal table of type DDSHRETVAL  
       EXCEPTIONS
            parameter_error    = 1
            no_values_found   = 2
            others                  = 3.             

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Refer if this helsp.&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.niraj.tripod.com/id27.html" target="test_blank"&gt;http://sap.niraj.tripod.com/id27.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Feb 2007 09:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-value-request/m-p/1920844#M382588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-24T09:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help Value request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-value-request/m-p/1920845#M382589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this sample 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables: mara, makt.

data: begin of itab occurs 0,
matnr like mara-matnr,
end of itab.


data : begin of btab occurs 0,
maktx like makt-maktx,
end of btab.

data mak like makt-maktx.

DATA : return like ddshretval occurs 0 with header line.

data: begin of dynpfields occurs 0.
include structure dynpread.
data: end of dynpfields.

parameters: p_matnr like mara-matnr,
p_maktx like makt-maktx.

Initialization.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.

REFRESH ITAB.
SELECT matnr FROM mara INTO TABLE ITAB.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR '
dynprofield = 'P_MATNR '
dynpprog = sy-REPID
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = ITAB
return_tab = return.

select single maktx from makt into mak where matnr = return-fieldval.

p_matnr = return-fieldval.

refresh return.
clear return.

move 'P_MAKTX' to dynpfields-fieldname.
move mak to dynpfields-fieldvalue.
append dynpfields.


CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
      dyname               = sy-cprog
      dynumb               = sy-dynnr
    TABLES
      dynpfields           = dynpfields
    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 &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

refresh return.
clear return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Feb 2007 10:06:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-value-request/m-p/1920845#M382589</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2007-02-24T10:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: F4 help Value request</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-value-request/m-p/1920846#M382590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data : begin of i_bidst OCCURS 0,&lt;/P&gt;&lt;P&gt;bidstd(10) type c , ( DEFINED BY ME)&lt;/P&gt;&lt;P&gt;bidst like zvesim-bidst, ( DATA DICTIONARY FIELD)&lt;/P&gt;&lt;P&gt;end of i_bidst.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;initialization.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;i_bidst-bidst = 'A'.&lt;/P&gt;&lt;P&gt;i_bidst-bidstd = 'APPROVED'.&lt;/P&gt;&lt;P&gt;append i_bidst.&lt;/P&gt;&lt;P&gt;i_bidst-bidst = 'R'.&lt;/P&gt;&lt;P&gt;i_bidst-bidstd = 'REJECTED'.&lt;/P&gt;&lt;P&gt;append i_bidst.&lt;/P&gt;&lt;P&gt;i_bidst-bidst = 'S'.&lt;/P&gt;&lt;P&gt;i_bidst-bidstd = 'SUBMITTED'.&lt;/P&gt;&lt;P&gt;append i_bidst.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BIDST.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;RETFIELD = 'BIDST'&lt;/P&gt;&lt;P&gt;DYNPROFIELD = 'P_BIDST'&lt;/P&gt;&lt;P&gt;DYNPPROG = SY-CPROG&lt;/P&gt;&lt;P&gt;DYNPNR = SY-DYNNR&lt;/P&gt;&lt;P&gt;VALUE_ORG = 'S'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;VALUE_TAB = I_BIDST.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Feb 2007 10:06:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f4-help-value-request/m-p/1920846#M382590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-24T10:06:55Z</dc:date>
    </item>
  </channel>
</rss>

