Skip to Content
author's profile photo Former Member
Former Member

Regarding Dynp_values_read

hi all,

i have to read ascreen field of type NUM(8) and when i pass it to FM Dynp_values_read

the field FIELDVALUE in DYNPREAD structure is of character type.now after coming out of this FM my fieldvalue is of type character and not of type.NUM8.

DATA: dyname LIKE d020s-prog VALUE 'Z_PREMRP',

dynumb LIKE d020s-dnum VALUE '1000'.

DATA: BEGIN OF dynpfields OCCURS 3.

INCLUDE STRUCTURE dynpread.

DATA: END OF dynpfields.

MOVE 'PROJECT-LOW' TO dynpfields-fieldname.

APPEND dynpfields.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = dyname

dynumb = dynumb

TABLES

dynpfields = dynpfields.

READ TABLE dynpfields WITH KEY fieldname = 'PROJECT-LOW'.

IF sy-subrc = 0.

  • dynpfields-fieldvalue = pspnr1(type num 8).

pspnr1 = dynpfields-fieldvalue .

ENDIF.

i want the fieldvalue to be in num8 any help wud be appreciated

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 25, 2009 at 10:32 AM

    After U get the value from the FM 'DYNP_VALUES_READ'

    use FM CONVERSION_EXIT_ALPHA_INPUT to get the 0's padded in front and pass this to

    the field of type NUM

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      To my understanding, If Num holds 00000005 then you need to get 5 in a CHAR Variable. If this is the case then make sure that the CHAR Var is of length similar to Num. Move Num to VAR then use SHIFT statement to remove all the 0's.

      If this is not the case then breif your requirement.

      Thanks,

      Prashanth

  • author's profile photo Former Member
    Former Member
    Posted on Feb 25, 2009 at 10:32 AM

    Hi,

    Check by moving the Field from Function Module to a Variable of type NUM(8).

    Hope this would work.

    Thanks,

    Prashanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 25, 2009 at 10:32 AM

    Hi,

    can you please check this link,it may help you

    dynpvaluesread-returning-an-empty-table

    Thanks and regards

    Durga.K

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 25, 2009 at 10:39 AM

    Hi friend,

    See FM 'MOVE_CHAR_TO_NUM' .

    Use FM 'MOVE_CHAR_TO_NUM' after 'DYNP_VALUES_READ'.

    Thanks..

    Edited by: Sap Fan on Feb 25, 2009 11:39 AM

    Edited by: Sap Fan on Feb 25, 2009 11:40 AM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.