SD_Material_Determination

Hi
I tried this code in SE38, but it's giving
REPORT  ZSA.
TABLES : QMEL, VBAP.
DATA: L_BVBPAKOM           LIKE BVBPAKOM OCCURS 2 WITH HEADER LINE.
DATA: L_KONDDP_EXT         LIKE KONDDP_EXT_SERVICE
                                           OCCURS 2 WITH HEADER LINE.
DATA: L_BVBAKKOM           LIKE BVBAKKOM.
DATA: L_MATNR              LIKE QMEL-MATNR.
DATA: L_TVSU               LIKE TVSU.
Move '000000000100003676' to VBAP-MATNR.
CALL FUNCTION 'SD_MATERIAL_DETERMINATION'
           EXPORTING
              I_KALSU    =
                I_MATNR    = vbap-matnr
               I_DATUM    =
              I_VWPOS    =
              I_POSNR_HP =
              I_ARKTX    =
                I_BVBAKKOM = L_BVBAKKOM
           IMPORTING
                E_MATNR    = L_MATNR
              E_ARKTX    =
                E_TVSU     = L_TVSU
           TABLES
                I_BVBPAKOM = L_BVBPAKOM
                E_KONDDP_SERVICE = L_KONDDP_EXT
           EXCEPTIONS
                CALL_ERROR    = 1
                ERROR_MESSAGE = 2
                OTHERS        = 3.
write : / L_MATNR.
But it's not giving any output. help please.......
-subha

Hi Subhashini,
Use this Pseudo code:
Select Single KNUMH  from KOTD001 into V_KNUMH
                 where matwa = matnr(your material).
IF sy-subrc = 0.
Substitution found.
Else.
*--Check next table . Please check
Select Single KNUMH  from KOTD002 into V_KNUMH
                 where matwa = matnr(your material)
                 and  VKORG = Sales org
                 AND VTWEG = DIST, CHANNEL
if sy-subrc = 0.
substitution found.
else.
*--next table
Select Single KNUMH  from KOTD011 into V_KNUMH
                 where matwa = matnr(your material)
                 and  VKORG = Sales org .
AND SO ON..
I don't know how many determination tables used in you config..
Lanka
KOTD002
KOTD011
KOTD502
You can check your material against these tables based on MATWA = your material VKORG = Sales ORG for a valid dates.
If you find any entry means you have substitution for that mayerial. The use KOTD**-KNUMH and read table "KONDDP".

Similar Messages

  • Material detremination using fm SD_MATERIAL_DETERMINATION

    hi gurus,
    i ma using the function module SD_MATERIAL_DETERMINATION to find the substitutes of material.
    i ma passing only the materail number MATNR in importing parameter but i am not getting any substitutes of that materail
    altough my functional guy said that he has created the substitutes for that material.
    can you please help me out it s very urgent

    Hi, has your question be answered? What was the outcome / result?

  • Regarding VA01 issue

    hi all  ,
    i got issue in VA01 transaction . actually my customer wants an message in VA01 transaction when quantity is not there . for  example  if  user entering 20 quantity for material but it has  got 3 quantity only even though it has got 3 quantity its going to next screen as per my requriement  if 20 quantity is not there it should give message that it has not got 20 qantity ,it has only 3 quantity . can anybody help me how to solve this issue . Thanks

    hi
    Please use this FM to check for particular material
    CALL FUNCTION 'SD_MATERIAL_DETERMINATION'

  • Material Determination BAPI

    Hi ,
    Can any one let me know what is the BAPI used for
    Functional module =SD_Material_Determinations.
    BAPI for Material Determination?

    Hi!
    I don't know the details of article replacements, but in general: that's the way it should work.
    If there is no stock or some other article blocks (no sales period, X-chain status...), then the replacement article should come into the documents.
    Also a creation by BAPI is no exception from business point of view - it has to follow the same rules as an online creation. OK - your customer requirement is currently different.
    But if the creation should be with article A, then the replacement customizing (also for online creation) has to be adjusted.
    By the way, isn't BAPI_SALESORDER_CREATEFROMDAT2 up to date?
    Regards,
    Christian

Maybe you are looking for