cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using BAPI_OBJCL_CHANGE

former_member42743
Active Contributor
0 Likes
14,688

I've looked at a ton of entries in the questions but I probably don't know enough to undersrtand what i'm reading.

So here is the issue.

We have a program that updates batch characteristics based on some business process requirements. This works.

However, we will have some numeric characteristics that have no values, (i.e. null or in SAP parlence, not not-initial) when the program runs. When the program is done, the batch values now shows as 0.00 and not null for these characteristics. The developers solution for this was to go back and delete them. But this resutls in change records showing a value of 0.00 created and a value of 0.00 deleted in the batch change records. Not good and not accurate.

I know in the underlaying tables there is an indicator flag, (initial/not-initial), that tells the system whether the value stored (0.0000000000) is really a true zero, or null.

My developers are telling me that is how BABI_OBJCL_CHANGE works. I disagree. There must be a way to use BABI_OBCJL_CHANGE to only update the characteristics you want to and not have it "default" in 0.00 for numeric characteristics that the program shouldn't even touch or know about.

Any suggestions as to what I can suggest to my developers?

Thanks!

Craig

View Entire Topic
Former Member
0 Likes

The BAPI has a parameter for not setting default values, that will allow you to add characteristic without setting a value. I'll look up the logic once I get to the office.

SimoneMilesi
Active Contributor

Hi Samuli,

are you talking about NO_DEFAULT_VALUES import parameter?

former_member182371
Active Contributor

keep_same_defaults = 'X' ? (see OSS Note 1930673 - BAPI_OBJCL_CHANGE: Interface enhancement)

SimoneMilesi
Active Contributor

Thanks Pablo: I just downloaded and installed it 🙂

Former Member

I just checked. I'm using the flags NO_DEFAULT_VALUES and KEEP_SAME_DEFAULTS mentioned by Simone and Pablo in my program to avoid the mentioned issue. You have to explicitly set a non initial value for any characteristic for it to be set/changed.

former_member42743
Active Contributor
0 Likes

Also just to be clear, I am specifcally referring to batch class 023. I think that class has some special nuances to it vs. say material class 001 or vendor class 010.

Craig

SimoneMilesi
Active Contributor

The behaviour should be the same.

Try to give your Abapers the OSS note from Pablo and link them this thread 🙂

former_member42743
Active Contributor
0 Likes

Thank you so much for your help! That's exactly what I did! Hopefully they'll look at it and I'll hear something next week on it.

Craig