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

Validation on Amount field

Former Member
0 Likes
563

Hi,

I have a reqmt to generate two files with one program

one is .txt file need to upload to application server and another is csv file send as mail.

Here im using PAYR table and fetching RWBTR amount field.

The reqmt is when ever we are generating .txt file the amount filed should not contain any decimals. Ex : 40.00 --- 4000

But when sending as mail field value should conatin decimals. Ex : 4000 --- 40.00

Pls provide me some pointer.

Thanks

Hi,

During Generation of Text File, pass amount field value into some character type field and then generate the file.

For CSV, do with the original amount field.

Only one additional field you have to use for amount field and your problem will be solved.

Regds,

Anil

2 REPLIES 2
Read only

Former Member
0 Likes
494

Hi

The field RWBTR has decimals, so u can move it to the csv file direclty, and u can pack it before moving it to the text file:

PARAMETERS: AMOUNT TYPE PAYR-RWBTR.

DATA: CSV(20) TYPE C,
      TXT(20) TYPE C.

MOVE AMOUNT TO CSV.

WRITE CSV.

PACK AMOUNT TO TXT.

WRITE / TXT.

Max

Read only

Former Member
0 Likes
494

Hi,

During Generation of Text File, pass amount field value into some character type field and then generate the file.

For CSV, do with the original amount field.

Only one additional field you have to use for amount field and your problem will be solved.

Regds,

Anil