Skip to Content
avatar image
-2
Former Member

How to input Screen field value (DFBATCH-MATNR of MSC2N ) to z function module

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jun 12, 2017 at 10:10 AM

    Hello,

    You can make use of FM READ_TEXT to read DFBATCH or parameter id of MATNR.

    thank you!!

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

      input-to-fm.jpg (63.0 kB)
      input-to-fm2.jpg (24.9 kB)
  • Jun 12, 2017 at 01: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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 16, 2017 at 07: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.

    Add comment
    10|10000 characters needed characters exceeded