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: 

BDC Failed in Background, but success in Foreground

Former Member
0 Kudos

Dear All,

We are using BDC interface for Tcode F-03, while executing this program in background through web service (Using XML) the system is converting warning message into an error message and as a result of which the document is not posted however if the same program is executed in foreground the document gets posted.

Please find the below xml data and screen shots in foreground level for your reference.


Kindly share valuable inputs.

Case 1 – Background - It’s failing

Request:
<?xml version="1.0" encoding="UTF-8"?>
<n0:ZIffmAccountClearFull xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
  <IDocheader>
    <Uniqid>389412</Uniqid>
    <Account>122010</Account>
    <Budat>2012-04-30</Budat>
    <Blart>SC</Blart>
    <Bukrs>C000</Bukrs>
    <Waers>INR</Waers>
    <Agums/>
    <Xblnr>FXBF1-0412</Xblnr>
    <Bktxt>FXBF1-Apr-12</Bktxt>
    <Bschl>50</Bschl>
    <Hkont>122030</Hkont>
    <Prctr>911001F0</Prctr>
    <Wrbtr>252.00</Wrbtr>
    <PmtType>S</PmtType>
  </IDocheader>
  <ItAccount>
    <item>
      <Account>122010</Account>
      <Xblnr/>
      <Zuonr/>
      <Belnr>240000139</Belnr>
      <Budat/>
      <Wrbtr/>
    </item>
    <item>
      <Account>122010</Account>
      <Xblnr/>
      <Zuonr/>
      <Belnr>240000166</Belnr>
      <Budat/>
      <Wrbtr/>
    </item>
    <item>
      <Account>122010</Account>
      <Xblnr/>
      <Zuonr/>
      <Belnr>240000152</Belnr>
      <Budat/>
      <Wrbtr/>
    </item>
</ItAccount>
</n0:ZIffmAccountClearFull>
Response:
<?xml version="1.0" encoding="utf-8" ?>
- <n0:ZIffmAccountClearFullResponse xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-

style">
- <EStatus>
- <item>
<Uniqid>389412</Uniqid>
<Docnumber />
<Status>FAIL</Status>
<Messagetype>E</Messagetype>
<Message>3 items were selected for Ref.Doc FXBF1-0412</Message>
<Sysubrc>4</Sysubrc>
</item>
- <item>
<Uniqid>389412</Uniqid>
<Docnumber />
<Status>FAIL</Status>
<Messagetype>E</Messagetype>
<Message>Cursor field DF05B-PSSKT(1) does not exist in the screen for Ref.Doc FXBF1-

0412</Message>
<Sysubrc>4</Sysubrc>
</item>
</EStatus>
<ItAccount />
</n0:ZIffmAccountClearFullResponse>


Case 2 – Foreground – In Debugging mode

Request:
<?xml version="1.0" encoding="UTF-8"?>
<n0:ZIffmAccountClearFull xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
  <IDocheader>
    <Uniqid>389412</Uniqid>
    <Account>122010</Account>
    <Budat>2012-04-30</Budat>
    <Blart>SC</Blart>
    <Bukrs>C000</Bukrs>
    <Waers>INR</Waers>
    <Agums/>
    <Xblnr>FXBF1-0412</Xblnr>
    <Bktxt>FXBF1-Apr-12</Bktxt>
    <Bschl>50</Bschl>
    <Hkont>122030</Hkont>
    <Prctr>911001F0</Prctr>
    <Wrbtr>252.00</Wrbtr>
    <PmtType>S</PmtType>
  </IDocheader>
  <ItAccount>
    <item>
      <Account>122010</Account>
      <Xblnr/>
      <Zuonr/>
      <Belnr>240000139</Belnr>
      <Budat/>
      <Wrbtr/>
    </item>
    <item>
      <Account>122010</Account>
      <Xblnr/>
      <Zuonr/>
      <Belnr>240000166</Belnr>
      <Budat/>
      <Wrbtr/>
    </item>
    <item>
      <Account>122010</Account>
      <Xblnr/>
      <Zuonr/>
      <Belnr>240000152</Belnr>
      <Budat/>
      <Wrbtr/>
    </item>
</ItAccount>
</n0:ZIffmAccountClearFull>


Response:
<?xml version="1.0" encoding="utf-8" ?>
- <n0:ZIffmAccountClearFullResponse xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-

style">
- <EStatus>
- <item>
<Uniqid>389412</Uniqid>
<Docnumber>20000075</Docnumber>
<Status>SUCCESS</Status>
<Messagetype>S</Messagetype>
<Message>Document 20000075 was posted in company code C000 for Ref.Doc FXBF1-0412</Message>
<Sysubrc>0</Sysubrc>
</item>
</EStatus>
<ItAccount />
</n0:ZIffmAccountClearFullResponse>

Thanks & regards

Rajasekhar S

1 ACCEPTED SOLUTION

0 Kudos

Dear Rajasekhar

Please comment the code for DF05B-PSSKT, because this field does not exist in the partial screen of the T code F-03, F-32 & F-44.

Regards

Nitesh

4 REPLIES 4

0 Kudos

Dear Rajasekhar

Please comment the code for DF05B-PSSKT, because this field does not exist in the partial screen of the T code F-03, F-32 & F-44.

Regards

Nitesh

0 Kudos

Dear Nitesh,

Thanx for your reply, Issue has been resolved.

We maintained same thing as you mention.

Regards

Rajasekhar S

PeterJonker
Active Contributor
0 Kudos

What is the error message you are getting in the job ?

0 Kudos

Dear Peter,

Thanx for your reply, Below error message has been populated in BDC

"Cursor field DF05B-PSSKT(1) does not exist in the screen for Ref.Doc FXBF1-

0412"

Issue has been solved.

Regards

Rajasekhar S