Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8735

Enter Document Number in "BAPI_SALESORDER_CHANGE".

$
0
0

Hi All,

 

I am facing some problem with BAPI_SALESORDER_CHANGE.

 

I am trying to update the Sales Order header with the BAPI BAPI_SALESORDER_CHANGE.

 

However, I am facing the below error though I pass the Sales document number correctly with all leading zeroes.

 

"Enter Document Number".

 

When I debugged, I found that it hits a function module SD_SALESDOCUMENT_CHANGE which inturn calls the FM

SD_SALES_DOCUMENT_READ. Inside the FM SD_SALES_DOCUMENT_READ, I could see that the value is being assigned to

VBAK-VBELN. But, there is a subroutine which gets executed after that. As soon as it enters in to the subroutine, the value of VBAK-VBELN gets vanished.

 

   

VBAK-VBELN = DOCUMENT_NUMBER.  PERFORM BELEG_LESEN(SAPMV45A).    "Once it enters inside this subroutine, the value of VBAK-VBELN gets cleared.  PERFORM KONV_SELECT(SAPFV45P).

 

Any pointers on this would be highly appreciated. I have gone through various posts of SDN. But, none of them could help me.

 

Note:  When I execute the above FM from SE37, it works fine and the VBAK-VBELN value doesnt get vanish even after entering the above mentioned Subroutine.

 

Thanks,

Babu KIilari


Viewing all articles
Browse latest Browse all 8735

Trending Articles