cancel
Showing results for 
Search instead for 
Did you mean: 

Need suggestions Reg: File-->RFC

Former Member
0 Kudos

Hi ,

We are trying to do File(CSV Based)-->RFC !

Now we are facing some problems with message mapping!

the input file coming like this:(each row having 32 fields)ex:

,jjjj,kkkkk,0812345,,

hhhhh,,sdsa,oooo,,

ewtre,,,fgf,908978

and top row having header and line items...!The 2nd & 3rd rows only are line items..!

when i am doing mapping i need to aviod line item field mapping which commonly exist in 1st row ...!it means there is common line item fields are exist in 1st ,2nd and 3rd rows. If i done mapping between soruce field to target line item fields...the xml payload writing another line item tags from first row which commonly exist in 1st row. Now i want aviod line time field mapping which commonly exist 1st row.

Hope i am not confused...

Please give me your ideas about this..

Thanks,

Sankar

Accepted Solutions (1)

Accepted Solutions (1)

former_member206604
Active Contributor
0 Kudos

Hi,

Correct me if I understood it wrongly..

You need to ignore the first line in the file right?

If so then your Document Offset parameter in the content conversion of the sender File adapter.

Thanks,

Prakash

Former Member
0 Kudos

No Prakash,

I want ignore line item fields only in first row!

these line item fileds commonly exist in each row ..but i dont want read these fileds from first row..!

Regards

sankar

bhavesh_kantilal
Active Contributor
0 Kudos

Sankar,

<i>Document Offset

Specify the number of lines that are to be ignored at the beginning of the document. This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.</i>

This should allow you to ignore the first line of your File right?

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Can you make briefly ...abt your suggestions!

see this is my scenario:

Logic is :

DT --->BAPI(Headerdata(1:1))

(only one datatype) BAPI(GLAccountData(0:U))

header data can be one time and GLAccountData can be more than one time.

Every thing coming properly ,except when map found any line item field(first row in csv file) which belongs to GLAccountDATA , then its wrting another item tags with null (if values are not avilable in 1st row) ..Now i want ignore those fields even fileds values exists...

ex : see below --> COSTCENTER and PROFIT_CTR wont have any values in 1st item tag after header data over, but you can able to see values for those in next item details, which is coming from 2nd and 3d row from csv file.

Please observe my output xml payload:

<?xml version="1.0" encoding="UTF-8" ?>

- <ns1:BAPI_INCOMINGINVOICE_CREATE xmlns:ns1="urn:sap-com:document:sap:rfc:functions">

- <HEADERDATA>

<INVOICE_IND>X</INVOICE_IND>

<DOC_TYPE>KR</DOC_TYPE>

< DOC_DATE>20060824</DOC_DATE>

<PSTNG_DATE>20060824</PSTNG_DATE>

<REF_DOC_NO>*INV1234</REF_DOC_NO>

<COMP_CODE>001150</COMP_CODE>

<CURRENCY>USD</CURRENCY>

<GROSS_AMOUNT>100000</GROSS_AMOUNT>

<PMNTTRMS>015N</PMNTTRMS>

<BLINE_DATE>20060824</BLINE_DATE>

< PYMT_METH>C</PYMT_METH>

<PAYEE_PAYER>9800331</PAYEE_PAYER>

<ITEM_TEXT>*777-8030-861</ITEM_TEXT>

</HEADERDATA>

- <GLACCOUNTDATA>

- <item>

<COSTCENTER />

<PROFIT_CTR />

</item>

- <item>

<GL_ACCOUNT>738100</ GL_ACCOUNT>

<ITEM_AMOUNT>60000</ITEM_AMOUNT>

<COMP_CODE>001150</COMP_CODE>

<ITEM_TEXT>*777-8030-861</ITEM_TEXT>

<COSTCENTER>7320</COSTCENTER>

<PROFIT_CTR>7320</PROFIT_CTR>

<ALLOC_NMBR />

</item>

- <item>

<GL_ACCOUNT>738100</GL_ACCOUNT>

<ITEM_AMOUNT>40000</ITEM_AMOUNT >

<COMP_CODE>001151</COMP_CODE>

<ITEM_TEXT>*777-8030-861</ITEM_TEXT>

<COSTCENTER>6010</COSTCENTER>

<PROFIT_CTR>6010</PROFIT_CTR>

<ALLOC_NMBR />

</item>

<item />

</GLACCOUNTDATA>

<ITEMDATA />

<RETURN />

</ns1:BAPI_INCOMINGINVOICE_CREATE>

When I am sending CSV file to BAPI ..(ie. .the first row combination of header fields and line item fileds) when GLAccountData filed found in first row , then map generating one more item with null values(if value is not avilable ) under HeaderData. So now i want aviod those items under Header Data .(which I made bold)...

FYI : i copied my inpust csv file, which is comma separated.(its a 3rows comma separated file and 32field length)

Input file:

-


001150,2006,KR,08242006,08242006,08,INV1234,USD,001,001150,31,K,H,100000,INV1234,777-8030-861,35345,,,08242006,C,9800331,015N,AT&T-SBC,,,,US,,,,9800331

,,,,,,,,002,001150,40,S,S,60000,,*777-8030-861,738100,7320,,,,,,,,,,,,,,

,,,,,,,,003,001151,40,S,S,40000,,*777-8030-861,738100,6010,,,,,,,,,,,,,,

Hope you got my problem now...

regards

sankar

Former Member
0 Kudos

Hi Shankar,

Can you please paste your input xml message.

i.e message that is generated after reading the CSV file.

Regards,

Sumit Khetawat

Former Member
0 Kudos

my input xml message:

-


<?xml version="1.0" encoding="utf-8" ?>

- <ns:MT_PESFILE xmlns:ns="urn:com.pesinvoice:xi:1.0">

- <HEADERDetails_RecordSet>

- <GLDetails_Structure>

<L_BUKRS>001150</L_BUKRS>

<L_GJAHR>2006</L_GJAHR>

<L_BLART>KR</L_BLART>

<L_BLDAT>08242006</L_BLDAT>

<L_BUDAT>08242006</L_BUDAT>

<L_MONAT>08</L_MONAT>

<L_XBLNR>*INV1234</L_XBLNR>

<L_WAERS>USD</L_WAERS>

<L_BUZEI>001</L_BUZEI>

<L_BUKRS1>001150</L_BUKRS1>

<L_BSCHL>31</L_BSCHL>

<L_KOART>K</L_KOART>

<L_SHKZG>H</L_SHKZG>

<L_SRBTR>100000</L_SRBTR>

<L_ZUONR>INV1234</L_ZUONR>

<L_SGTXT>*777-8030-861</L_SGTXT>

<L_ACCNT>35345</L_ACCNT>

<L_KOSTL />

<L_AUFNR />

<L_ZFBDT>08242006</L_ZFBDT>

<L_ZLSCH>C</L_ZLSCH>

<L_EMPFB>9800331</L_EMPFB>

<L_ZTERM>015N</L_ZTERM>

<L_NAME1>AT&T-SBC</L_NAME1>

<L_NAME2 />

<L_PSTLZ />

<L_ORT01 />

<L_LAND1>US</L_LAND1>

<L_STRAS />

<L_PFACH />

<L_REGIO />

<L_EMPFG>9800331</L_EMPFG>

</GLDetails_Structure>

- <GLDetails_Structure>

<L_BUKRS />

<L_GJAHR />

<L_BLART />

<L_BLDAT />

<L_BUDAT />

<L_MONAT />

<L_XBLNR />

<L_WAERS />

<L_BUZEI>002</L_BUZEI>

<L_BUKRS1>001150</L_BUKRS1>

<L_BSCHL>40</L_BSCHL>

<L_KOART>S</L_KOART>

<L_SHKZG>S</L_SHKZG>

<L_SRBTR>60000</L_SRBTR>

<L_ZUONR />

<L_SGTXT>*777-8030-861</L_SGTXT>

<L_ACCNT>738100</L_ACCNT>

<L_KOSTL>7320</L_KOSTL>

<L_AUFNR />

<L_ZFBDT />

<L_ZLSCH />

<L_EMPFB />

<L_ZTERM />

<L_NAME1 />

<L_NAME2 />

<L_PSTLZ />

<L_ORT01 />

<L_LAND1 />

<L_STRAS />

<L_PFACH />

<L_REGIO />

<L_EMPFG />

</GLDetails_Structure>

- <GLDetails_Structure>

<L_BUKRS />

<L_GJAHR />

<L_BLART />

<L_BLDAT />

<L_BUDAT />

<L_MONAT />

<L_XBLNR />

<L_WAERS />

<L_BUZEI>003</L_BUZEI>

<L_BUKRS1>001151</L_BUKRS1>

<L_BSCHL>40</L_BSCHL>

<L_KOART>S</L_KOART>

<L_SHKZG>S</L_SHKZG>

<L_SRBTR>40000</L_SRBTR>

<L_ZUONR />

<L_SGTXT>*777-8030-861</L_SGTXT>

<L_ACCNT>738100</L_ACCNT>

<L_KOSTL>6010</L_KOSTL>

<L_AUFNR />

<L_ZFBDT />

<L_ZLSCH />

<L_EMPFB />

<L_ZTERM />

<L_NAME1 />

<L_NAME2 />

<L_PSTLZ />

<L_ORT01 />

<L_LAND1 />

<L_STRAS />

<L_PFACH />

<L_REGIO />

<L_EMPFG />

</GLDetails_Structure>

- <GLDetails_Structure>

<L_BUKRS />

</GLDetails_Structure>

</HEADERDetails_RecordSet>

</ns:MT_PESFILE>

Answers (0)