Application Development 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: 

Reg flat file validations - uploading data into XK01 txn thru BDC technique

Former Member
0 Kudos
98

Dear Friends,

My requirement is to uplaod flat file data fm presentation server into XK01(46 fields) txn thru BDC.

After uplaoding data into Dummy internal table (46 fields) , i should validate the flat file data to check whether data is correct or incorrect.

If all the flat file data is correct, then data should be send to internal table IT_VALID and then uplaoded.

If any one of the flat file data is incorrect, whole data should be send to internal table IT_INVALID and then IT_INVALID data should be downloaded to flat file in presentation server and do corrections and then uplaoded the correct data.

But my problem is that i am uanble to validata following fields:

AKONT,

AKONT

ZUAWA

LNRZE

FDGRV

VZSKZ

ZINRT

ZTERM

TOGRU

ZWELS

ZAHLS

HBKID

TOGRR.

I was able to validate the remaining fields.

The method is used to validate is selecting a single field which is supposed to be validate from its respective check table and comparing with flat file data.

Pls help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
38

AKONT --- SKA1

ZUAWA

LNRZE-----LFA1

FDGRV

VZSKZ---T056

ZINRT

ZTERM

TOGRU

ZWELS

ZAHLS----T008

HBKID----T012

TOGRR.

I have given the table names aginst each DE...u can validate it with those tables..For the remaining data elements u have to ask ur functional consultant wht all values can come..u will have to hard code and validate..but before doint that u have to get confirmation regarding the values that may come to these fields..

Regards

Ansari

6 REPLIES 6

Former Member
0 Kudos
39

AKONT --- SKA1

ZUAWA

LNRZE-----LFA1

FDGRV

VZSKZ---T056

ZINRT

ZTERM

TOGRU

ZWELS

ZAHLS----T008

HBKID----T012

TOGRR.

I have given the table names aginst each DE...u can validate it with those tables..For the remaining data elements u have to ask ur functional consultant wht all values can come..u will have to hard code and validate..but before doint that u have to get confirmation regarding the values that may come to these fields..

Regards

Ansari

0 Kudos
38

My coding for validations:

example i am taking only for one field.

field name is AKONT.

TYPES:BEGIN OF x_ska1, "STRUCTURE FOR Recouncillation in general ledger - SKa1

SAKNR LIKE ska1-SAKNR,

END OF x_ska1.

DATA: t_ska1 TYPE STANDARD TABLE OF x_ska1 INITIAL SIZE 0, "INTERNAL TABLE

wa_ska1 TYPE x_ska1.

SELECT saknr FROM ska1 INTO TABLE t_ska1 FOR ALL ENTRIES IN t_itab WHERE saknr = t_itab-akont.

But here i am not getting data into internal table t_ska1.

Note: 1. flat file data for field AKONT is 31000 ie.., t_itab-akont

2.There is a record with data 31000 in the field SAKNR of SKA1 table.

Why i am not getting data ie ..,31000 into table t_ska1.

Pls help.

0 Kudos
38

Hi

Change the code like this:

TYPES:BEGIN OF x_ska1, "STRUCTURE FOR Recouncillation in general ledger - SKa1
SAKNR LIKE ska1-SAKNR,
END OF x_ska1.

DATA: t_ska1 TYPE STANDARD TABLE OF x_ska1 INITIAL SIZE 0, "INTERNAL TABLE
wa_ska1 TYPE x_ska1.

"create another internal table it_ska1

SELECT saknr FROM ska1 into it_ska1 FOR ALL ENTRIES IN t_itab WHERE saknr = t_itab-akont.
if sy-subrc = 0.
move it_ska1 to t_ska1.
endif.

Regards,

VIshwa.

0 Kudos
38

Dear Viswa,

i am not getting data into table it_ska1 when selecting saknr from table ska1.

sy-subrc = 4.

0 Kudos
38

Ok.

Try to debug and see what is the problem...check if the internal table field in the where condition holds correct value.. I think it is not picking up data from the standard table in the select statement and that is why it is throwing errors.

Regards,

Vishwa.

Former Member
0 Kudos
38

Hi Manoj,

Why are you not used LSMW foe vendor master uplaod. It will be much more convenient and all the fields are already there.

Regards,

Sangeeta.