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

invalid entries

Former Member
0 Likes
677

dear all,

i am uploading data from flat file to Intrenal table . In this flat file there is one field is Currency Key

my requirment is that whatever Currency key in my flat file or internal table it must be valid .

if in flat file or itab , i am maintaing invalid entreis like SDZ insted of "USD" then message should come invalid entries. please check your currency Key.

How to do that ?

dear all,

i am uploading data from flat file to Intrenal table . In this flat file there is one field is Currency Key

my requirment is that whatever Currency key in my flat file or internal table it must be valid .

if in flat file or itab , i am maintaing invalid entreis like SDZ insted of "USD" then message should come invalid entries. please check your currency Key.

How to do that ?

4 REPLIES 4
Read only

Former Member
0 Likes
620

Hi,

After uploading the data to your internal table.Write aread statement as follows,

Read table itab with key currency key <> 'USD'.

If sy-subrc = 0.

Message("please check your currency Key")

Endif.

<b><REMOVED BY MODERATOR></b>

Message was edited by:

Alvaro Tejada Galindo

Read only

former_member189629
Active Contributor
0 Likes
620

while appending values into your itab, check at the field position for currency. if u uploading the flat file line as a string into itab and using offsets to segregate data, use exact offset and add conditions like

IF i_STRING80(3) <> 'USD' or i_STRING80(3) <> 'INR'.

MESSAGE E001." Invalid currency

ENDIF.

<b><REMOVED BY MODERATOR></b>

Message was edited by:

Karthik

Message was edited by:

Alvaro Tejada Galindo

Read only

former_member404244
Active Contributor
0 Likes
620

hi,

ucan do like this

loop at itab.

if itab- currency key <> 'USD'.

Message e001.

Endif.

endloop.

Regards,

Nagaraj

Read only

Former Member
0 Likes
620

Thanks Karthik, and all,

Point has been given