Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Help in Dynp value read

Former Member
0 Likes
957

Hi abapers,

Iam using the FM 'DYnp_values_read' to read the screen values dynamically.

The field iam using here is a qty type .

When i move the dynp value to screen field iam getting a dump error. say 'CX_sy_converison_no_number'.

I found that this dump occurs when there is comma ex (1,000.000) . Is their any other function to remove the comma or any option in the 'Dynp_value_read' itself.

Regards

Priya.

4 REPLIES 4
Read only

Former Member
0 Likes
583

Hi Priya,

try out assigning the value '1,000' to some numeric variable and then pass it to the function module.

Read only

0 Likes
583

try this:

FORM get_screen_field_value USING F_FIELDNAME

F_PROGRAM

F_SCREEN_NO

CHANGING F_FIELDVALUE.

REFRESH: DYNP_TAB.

CLEAR DYNP_TAB.

MOVE: F_FIELDNAME TO DYNP_TAB-FIELDNAME.

APPEND DYNP_TAB.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = F_PROGRAM

DYNUMB = F_SCREEN_NO

  • PERFORM_CONVERSION_EXITS = 'X'

*PERFORM_INPUT_CONVERSION = 'X'

TABLES

DYNPFIELDS = DYNP_TAB

EXCEPTIONS

INVALID_ABAPWORKAREA = 1

INVALID_DYNPROFIELD = 2

INVALID_DYNPRONAME = 3

INVALID_DYNPRONUMMER = 4

INVALID_REQUEST = 5

NO_FIELDDESCRIPTION = 6

INVALID_PARAMETER = 7

UNDEFIND_ERROR = 8

DOUBLE_CONVERSION = 9

OTHERS = 10.

LOOP AT DYNP_TAB WHERE FIELDNAME = F_FIELDNAME.

CATCH SYSTEM-EXCEPTIONS CONVT_NO_NUMBER = 1.

move: DYNP_TAB-FIELDVALUE TO F_FIELDVALUE.

endcatch.

if sy-subrc = 1.

clear sy-subrc.

while sy-subrc = 0.

replace ',' with space into DYNP_TAB-FIELDVALUE.

endwhile.

condense DYNP_TAB-FIELDVALUE no-gaps.

move DYNP_TAB-FIELDVALUE TO F_FIELDVALUE.

endif.

ENDLOOP.

ENDFORM. " get_screen_field_value

Read only

Former Member
0 Likes
583

hi

good

go through this link, which ll give you idea about using the DYnp_values_read ,

http://www.sapprofessionals.org/?q=abap_code

thanks

mrutyun^

Read only

former_member283648
Participant
0 Likes
583

Hi,

May be u move this value to a character variable and then do the following.

data : quantity(30) type c,

lv_count type i.

quantity = <Your variable for quantity>.

do.

lv_count = strlen( quantity).

if lv_count <= 0.

exit.

endif.

If not quantity(lv_count) cn lv_numerics (this variable will contain 0123456789)

clear quantity(lv_count).

endif.

enddo.

condense quantity no-gaps.

then use this value to be passed to your variable or to the 'DYNP_READ' FM.