2006 Dec 22 3:11 PM
Hi
I want to release a document which is on credit hold using VKM4. Now this releasing process needs to be done in the background.
For this I believe we need to create a BDC.
But the problem is when I record the BDC for VKM4, it does not record the check box selection.
Plz advice
Regards
Abhishek.
2006 Dec 22 7:29 PM
Hi,
What kind of document is it..Is it delivery document..Use the FM SD_DELIVERY_CREDIT_RELEASE
Thanks,
Naren
2006 Dec 22 3:41 PM
2006 Dec 22 4:05 PM
Abhishek,
Dont use BDC INSTEAD USE BAPI's
Try this BAPI BAPI_SALESDOCUMENT_CHANGE
Sankar
2006 Dec 22 5:30 PM
Hi Sankar;
Thnx for the response.
ActuaI haven't worked much on BAPI.
So if u could plz. expln me abt this particular BAPI, like which paramaters should I pass?
Thnx
Regards
Abhishek
2006 Dec 22 5:33 PM
Hi,
For release a document which is on credit hold try using the FM SD_ORDER_CREDIT_RELEASE..
CALL FUNCTION 'SD_ORDER_CREDIT_RELEASE'
EXPORTING
VBELN = VBAK-VBELN
EXCEPTIONS
ERROR_MESSAGE = 4.
This FM is getting called in VKM4 transaction..
Thanks,
Naren
2006 Dec 22 5:44 PM
Hi,
Check this sample report..
PARAMETERS: p_vbeln LIKE vbak-vbeln OBLIGATORY.
AT SELECTION-SCREEN.
Check the sales document.
SELECT SINGLE vbeln INTO p_vbeln FROM vbak
WHERE vbeln = p_vbeln.
IF sy-subrc <> 0.
MESSAGE e208(00) WITH 'Invalid sales document'.
ENDIF.
START-OF-SELECTION.
Release the credit.
CALL FUNCTION 'SD_ORDER_CREDIT_RELEASE'
EXPORTING
vbeln = p_vbeln
EXCEPTIONS
error_message = 4.
IF sy-subrc <> 0.
WRITE: / 'Error in Credit release'.
ELSE.
WRITE: / 'Credit hold is released sucessfull for ', p_vbeln.
ENDIF.
Thanks,
Naren
2006 Dec 22 7:25 PM
Hi Naren
Thnx for the response.
The problem that I am facing is, the document nos. whose credit are to be released are not present in VBAK, and this FM checks doc nos. from VBAK.
Plz advice.
Regards
Abhishek
2006 Dec 22 7:29 PM
Hi,
What kind of document is it..Is it delivery document..Use the FM SD_DELIVERY_CREDIT_RELEASE
Thanks,
Naren
2006 Dec 22 8:15 PM