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: 

BAPI_OBJCL_GETDETAIL inquiry

Former Member
0 Kudos

Hi Experts,

I have a requirement that needs to update and fill values of batches that doesn't have values.

I'm having trouble looking for a related BAPI to call batches that doesn't have value in MSC3N.

Using this BAPI BAPI_OBJCL_GETDETAIL, it only retrieves under table parameters allocvaluenum, allocvaluechar etc, where fields in MSC3N have value.

Is there any related BAPI that captures blank values in batches? Here's my sample coding below:

lw_table = 'MCH1'.

lw_class = '023'.

lw_class_desc = 'BA_PAPER'.

CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'

EXPORTING

objectkey = lw_objectkey

objecttable = lw_table

classnum = lw_class_desc

classtype = lw_class

TABLES

allocvaluesnum = li_num

allocvalueschar = li_char

allocvaluescurr = li_curr

return = li_bapiret2.

Notes: lw_objectkey = concatenated matnr and batch.

Appreciate your <impatient vocabulary removed by moderator> feedback here.

Regards,

Aura

Edited by: Thomas Zloch on Oct 21, 2010 12:56 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Not that i know of.

But: you can read the characteristics as defined for the class. And then you can check the results of the function against the characteristics you read from the class (or the other way around).

That way you can determine if a batch characteristic is filled (present) or not.

2 REPLIES 2

Former Member
0 Kudos

Not that i know of.

But: you can read the characteristics as defined for the class. And then you can check the results of the function against the characteristics you read from the class (or the other way around).

That way you can determine if a batch characteristic is filled (present) or not.

0 Kudos

Hi Maen,

Thanks for your comment. It was helpful, but after series of tests, I've found out the solution. For the sake of others, here's what I've done.

I just flagged the UNVALUATED_CHARS in exporting and bravo, it selects all batch characteristics w/ or w/o value.

CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'

EXPORTING

objectkey = lw_objectkey

objecttable = lw_table

classnum = lw_class_desc

classtype = lw_class

unvalueted_chars = 'X'

TABLES

allocvaluesnum = li_num

allocvalueschar = li_char

allocvaluescurr = li_curr

return = li_bapiret2.

Thanks again SDN!

Aura

Edited by: Aura Yu on Oct 23, 2010 11:49 PM