01-20-2012 2:59 AM
Hi All,
I am using direct input method, program name : RM06IBI0 for Info records. My question is If I need to skip record based on the first value in my flat file, do I need to write the SKIP_RECORD statement in all the structures used, or writing it in the first structure of "Maintain Field Mapping and Conversion Rules" step will be sufficient.
And also, does it matter if I upload flat file from Local file or is it better to upload it from Application server.
I have searched many threads, but couldn't get the appropriate solution.
Thanks.
Lahari
01-20-2012 3:37 AM
Hi ,
you can use SKIP_TRASACTION or SKIP_RECORD(which is useful when you have header+items ).
better option is : - first you load file from PC .anyhow system write files into app serverbased on the logical path/file u have given at that step.
regards
Prabhu
01-20-2012 3:37 AM
Hi ,
you can use SKIP_TRASACTION or SKIP_RECORD(which is useful when you have header+items ).
better option is : - first you load file from PC .anyhow system write files into app serverbased on the logical path/file u have given at that step.
regards
Prabhu
01-20-2012 3:49 AM
Hi Prabhu,
Thanks for your reply, but my question here is If I use SKIP_RECORD, do i need to write the statement in all the structures __BEGIN_OF_RECORD__ event or just writing it in first structure is sufficient to skip the entire record.
For Example :
I have to check if the first field from flat file in header is some value take 'ABC', so now I have to skip this record.Now i want to know if I write SKIP RECORD In header structure BBKPF is sufficient or I need to write in individual like below :
I have structures BBKPF Header __BEGIN_OF_RECORD__ SKIP RECORD
BBSEG -__BEGIN_OF_RECORD__ : SKIP RECORD
BBTAX - __BEGIN_OF_RECORD__ : SKIP_RECORD
BSELK - __BEGIN_OF_RECORD__ : SKIP_RECORD
BSELP - __BEGIN_OF_RECORD__ : SKIP_RECORD
or BBKPF Header __BEGIN_OF_RECORD__ SKIP RECORD
BBSEG
BBTAX
BSELK
BSELP
Hope you got my point.
Thanks.
Lahari
01-20-2012 4:41 AM
Just Skipping in BKPF is enough ! if u check the code in LSMW. There is a loop on structures BBSEG ,BBTAX etc inside loop BBKPF.
So Skipping BKPF is enough
01-20-2012 8:13 AM
try it.
in general you have to differentiate between skip_record and skip_transaction.
a skip_transaction will leave the loop and you dont need to care about a skip in the other structures behind this skip.
but with a skip_record it can happen that you just skip the header record, but still create content in the other structures.
01-20-2012 8:45 AM
Hi,
if validation is failed at header level ..then you need to skip whole transaction by using skip_transaction.
if validation is failed at item level and if you wanna skip only that item the use skip_record or if you dont want to create docment at all the use skip_transaction...
you can call skip commands anywhere in the structures....
select single infnr
into lv_infnr
from eine
where infnr = bein0-infnr
and ekorg = pir1-ekorg
and werks = bein0-werks.
if sy-subrc ne 0.
write: / pir1-matnr, pir1-lifnr, 'PIR not found in POrg/Plant',
pir1-ekorg, pir1-werks.
g_skip_transaction = yes.=>or skip_transaction......
endif.
regards
Prabhu
01-20-2012 3:40 AM
you can use SKIP_TRANSACTION in event . __BEGIN_OF_TRANSACTION__
SKIP_TRANSACTION.