2006 Nov 28 7:34 AM
hi,
i have 2 field on screen. 1 is percentage & 2nd is value.
now on on basis of % i want to calculate a value & show it in a particular field.
how to write in PAI.
regards
raj
2006 Nov 28 8:53 AM
anvesha,
thru break-point only i come to know that particular this statement is not working.
and i found that table of dynpread FIELDVALUE is char 255.
and my field value is numeric. do you think because of type mismatch it is not working.
thanks
raj
hi,
i have 2 field on screen. 1 is percentage & 2nd is value.
now on on basis of % i want to calculate a value & show it in a particular field.
how to write in PAI.
regards
raj
2006 Nov 28 7:39 AM
hi,
<b>in PAI.</b>
val_per = screen_field_percenage.
val_value = (number * val_per)/100.
DATA: BEGIN OF dynprofelder OCCURS 10.
INCLUDE STRUCTURE dynpread.
DATA: END OF dynprofelder.
REFRESH dynprofelder.
dynprofelder-fieldname = 'WF_FIELD_VALEU_SCREEN'. "screen field name
dynprofelder-fieldvalue = val_value .
APPEND dynprofelder.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynprofelder
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.rgds
Anver
<b><i>if hlped pls mark points</i></b>
2006 Nov 28 7:42 AM
in PAI.
per = screen_field_percenage.
value = (number * per)/100.
DATA: BEGIN OF dynprofelder OCCURS 10.
INCLUDE STRUCTURE dynpread.
DATA: END OF dynprofelder.
REFRESH dynprofelder.
dynprofelder-fieldname = 'WF_FIELD_VALEU_SCREEN'. "screen field name
dynprofelder-fieldvalue = val_value .
APPEND dynprofelder.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynprofelder
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
2006 Nov 28 7:47 AM
2006 Nov 28 8:23 AM
thanks anvesha,
i did as per your instructions it is working good.
but this statement is not working.
<b> dynprofelder-fieldvalue = val_value .</b>
it is not assigning val_value to dynprofelder-fieldvalue. (val_value = 1200.00)
please help.
regards
raj
2006 Nov 28 8:34 AM
try this.
data: dynfields type table of dynpread with header line.
REFRESH dynfields.
dynfields-fieldname = 'WF_FIELD_VALEU_SCREEN'. "screen field name
dynfields-fieldvalue = val_value .
append dynfields.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.rgds
anver
2006 Nov 28 8:39 AM
no anversha same problem
dynfields-fieldvalue = XBDC.
xbdc = 1200.00
it is not assigning to dynfields-fieldvalue .
thanks & regards
raj
2006 Nov 28 8:49 AM
hi,
put a break point after the FM dynp_values_update.
i think the getting refreshed some where.
put a break point and try.
rgds
Anver
2006 Nov 28 8:53 AM
anvesha,
thru break-point only i come to know that particular this statement is not working.
and i found that table of dynpread FIELDVALUE is char 255.
and my field value is numeric. do you think because of type mismatch it is not working.
thanks
raj
2006 Nov 28 9:02 AM
hi,
if so convert the numeric to char and try.
eg:
Converting type n to type c
DATA: int_val(4) TYPE N.
ch_val(4).
MOVE: int_val TO ch_val.rgds
Anver
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |