06-12-2017 10:16 AM
I want to import screen field value (
DFBATCH-MATNR)
to my z function module to validate the batch charactersics . Kindly help me.
Regards,
Sanjay Deshpande
06-12-2017 11:10 AM
Hello,
You can make use of FM READ_TEXT to read DFBATCH or parameter id of MATNR.
thank you!!
06-12-2017 11:48 AM
I have created new Batch Characteristics with t-code ct04
Now I required to write code to validate this field in above function. My requirement is how to capture material code and plant from following screen:
Thanks & Regards,
Sanjay Deshpande
06-12-2017 2:35 PM
In your FM you could analyze the memory of the caller (function group CHRG) as DFBATCH is declared there with a TABLES statement. The data is available. Call SYSTEM_CALLSTACK to insure you are in the correct transaction. Then use either a wild assign statement (to "(SAPLCHRG)DFBATCH") or just get parameter id MAT.
NB: Of course when the characteristics is changed thru BAPI or classification classes you will have to adapt your code. Another solution is to provide a wide generoc value list in the FM, and then perform some check(s) in method CHECK_CLASSIF_BEFORE_SAVE of BAdI BATCH_MASTER.
06-20-2017 9:41 AM
Thanks Raymond.
By referring https://blogs.sap.com/2013/05/14/create-new-batch-characteristics-with-values-checked-and-suggested-...
I have created z function module to validate the batch characteristics value. In this function there are are Import, Export,Changing, Table tabs are blank. I am passing "(SAPLCHRG)DFBATCH" parameters to FM : REUSE_ALV_POPUP_TO_SELECT which is used in Z function module. I am getting selected output value but unable to pass the same or assign to the batch characteristics of MSC2N screen field (batch characteristics value).
Please help.
- Sanjay
06-14-2017 1:04 PM
I have followed by :
https://blogs.sap.com/2013/05/14/create-new-batch-characteristics-with-values-checked-and-suggested-...
With the above link procedure I can get filter popup data but while returning to the main screen of batch characteristics value not restoring to the field.
Kindly help me.
06-16-2017 8:51 AM
You can try with this function module 'CLFM_SELECT_AUSP' to read material characteristics.
pass the values as: 'O' to mafid / '001' to classtype & pass the object.
Regards,
Suren.