Quantcast
Channel: SCN : Popular Discussions - Java Development
Viewing all articles
Browse latest Browse all 518

Prevent JCo of sending empty fields?

$
0
0

Hi everyone,

 

I am currently writing an interface for creating customer and material master data inside sap.

For this purpose I use Java and JCo3.

 

My interfaces are working properly, but one thing is missing.

 

For creating customers I have written a wrapper class in abap for the function module SD_CUSTOMER_MAINTAIN_ALL.

I already can create customers and as well can send updates, but for updates I got an issue.

 

I have to push all fields to SAP even if they haven't changed.

 

For example:

 

name: Test

Street: DemoStreet

City: DemoCity

 

If I want to update only the City, I have to send all three values. If I don't do this, the Name and Street will be deleted in SAP.

If I take a look at the xml structure (JCoFunction function.toXML()) I can see, that every field I do not fill with an value is send as an empty field. In case of that, every empty field will be deleted in SAP.

 

Is there a way to prevent JCo to send empty fields? (In other words: If I don't fill a field, I want JCo not to send it)

 

Best Markus


Viewing all articles
Browse latest Browse all 518

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>