Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

VKM4

Former Member
0 Kudos
1,680

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
533

Hi,

What kind of document is it..Is it delivery document..Use the FM SD_DELIVERY_CREDIT_RELEASE

Thanks,

Naren

8 REPLIES 8

Former Member
0 Kudos
533

Hi,

Please try the FM SD_ORDER_CREDIT_RELEASE

Thanks,

Naren

Former Member
0 Kudos
533

Abhishek,

Dont use BDC INSTEAD USE BAPI's

Try this BAPI BAPI_SALESDOCUMENT_CHANGE

Sankar

0 Kudos
533

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

Former Member
0 Kudos
533

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

Former Member
0 Kudos
533

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

0 Kudos
533

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

Former Member
0 Kudos
534

Hi,

What kind of document is it..Is it delivery document..Use the FM SD_DELIVERY_CREDIT_RELEASE

Thanks,

Naren

0 Kudos
533

Thnx

Got It