10-21-2010 9:59 AM
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
10-21-2010 10:11 AM
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.
10-21-2010 10:11 AM
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.
10-23-2010 10:49 PM
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