2006 Jan 19 5:06 PM
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
2006 Jan 19 5:20 PM
Don't know if you can use that like this. It is dependent apond other imformation. You need to specify KALSU to get it passed the first check.
IF I_MATNR IS INITIAL OR
( I_KALSU IS INITIAL AND
I_BVBAKKOM IS INITIAL ).
RAISE CALL_ERROR.
ENDIF.But then in the MATERIALFINDUNG_EXT form, it does this check.
IF VBAK IS INITIAL.
RAISE CALL_ERROR.
ENDIF.
This is where it is stopping for me. There must be another function module which is filling this VBAK, that must be used with this function module. Not really sure.
Regards,
Rich Heilman
Don't know if you can use that like this. It is dependent apond other imformation. You need to specify KALSU to get it passed the first check.
IF I_MATNR IS INITIAL OR
( I_KALSU IS INITIAL AND
I_BVBAKKOM IS INITIAL ).
RAISE CALL_ERROR.
ENDIF.But then in the MATERIALFINDUNG_EXT form, it does this check.
IF VBAK IS INITIAL.
RAISE CALL_ERROR.
ENDIF.
This is where it is stopping for me. There must be another function module which is filling this VBAK, that must be used with this function module. Not really sure.
Regards,
Rich Heilman
2006 Jan 19 5:20 PM
Don't know if you can use that like this. It is dependent apond other imformation. You need to specify KALSU to get it passed the first check.
IF I_MATNR IS INITIAL OR
( I_KALSU IS INITIAL AND
I_BVBAKKOM IS INITIAL ).
RAISE CALL_ERROR.
ENDIF.But then in the MATERIALFINDUNG_EXT form, it does this check.
IF VBAK IS INITIAL.
RAISE CALL_ERROR.
ENDIF.
This is where it is stopping for me. There must be another function module which is filling this VBAK, that must be used with this function module. Not really sure.
Regards,
Rich Heilman
2006 Jan 19 5:28 PM
Yes you are right. it's stopping me in First check itself....... Don't to know how to findout???????
-subha
2006 Jan 19 5:50 PM
Hi,
Could you find anything? PLease tell me for which transaction this functionmodule SD_MATERIAL_DETERMINATION is calling. I checked but couldn't findout.....
Help needed please????????
-subha
2006 Jan 19 6:00 PM
I think CALL FUNCTION 'SD_SALES_HEADER_MAINTAIN'
EXPORTING
FVBAKKOM = VBAKKOM
SUPPRESS_AVAILIBILITY_DIA = 'X'
SUPPRESS_TEXT_POPUP = 'X'
STATUS_BUFFER_REFRESH = SPACE
IMPORTING
EVBAK = VBAK
TABLES
FXVBPAKOM = XVBPAKOM.
this FM is filling value for VBAK. How can i hard input for this funcation or how can get values for structure VBAKKOM??????????
thanks,
Subashini
2006 Jan 19 9:22 PM
What's the transaction run for SD_MATERIAL_DETERMINATION. I see program name as SAPLQM06 & include LQM06I50.
Help need?????????
thanks,
Subashini
2006 Jan 19 9:27 PM
2006 Jan 19 9:42 PM
I put this code
<b>If VBAP-MATNR = '000000000100003676'.
MESSAGE w000(ZEXAMPLE).* EXist
else.
MESSAGE W001(ZEXAMPLE).* Not Exist
endif. IN MV45AFZA</b>. TO check whether material substitution is available for the material then Message should display like this "Material SUBSTITUTION EXIST" suppose if material substitution is not available for material then I need to have this message 'Material substituion not EXIST" . I am trying to find out how can i know material having substitution or not?
For hardcoded materialnumber above i know Material substitution is Exist. So i gave condition like that.....
2006 Jan 19 9:43 PM
Please guide me it's urgent need...........
Really appreciate the help.............
-subha
2006 Jan 19 10:06 PM
Hi Subashini,
As I am looking in to the tables for material determination they are generally stored in
KOTD001
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".
May be this will help you.
Lanka
2006 Jan 19 10:10 PM
Can You please give me sample code???? That will very great help......
Thanks,
Subha
2006 Jan 19 10:26 PM
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".
2006 Jan 19 10:26 PM
2006 Jan 19 10:31 PM
Hi,
I looked into tables KOTD001, 02 they don't have any data but KOTD011 having data So i put code like this Is it correct???????
TABLES : KOTD011.
select * from KOTD011 where matnr = VBAP-MATNR.
endselect.
If VBAP-MATNR = KOTD011-MATNR.
MESSAGE w000(ZEXAMPLE).
else.
MESSAGE W001(ZEXAMPLE).
endif.
-subha
2006 Jan 19 10:38 PM
Hi Subhashini,
Please use function: PRODUCT_SUBSTITUTION as srini mentioned. this will work for you.
Lanka
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |