SAP SD_CREDIT_VALUE_ORDER Function Module for









SD_CREDIT_VALUE_ORDER is a standard sd credit value order SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for sd credit value order FM, simply by entering the name SD_CREDIT_VALUE_ORDER into the relevant SAP transaction such as SE37 or SE38.

Function Group: VKMP
Program Name: SAPLVKMP
Main Program: SAPLVKMP
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SD_CREDIT_VALUE_ORDER pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'SD_CREDIT_VALUE_ORDER'"
EXPORTING
* POSNR = ' ' "Item Number
VBAK = "Sales Document
* FREIGABE = ' ' "Credit value for release ('X') or display (' ')
* IV_SORTED = ' ' "

IMPORTING
AMTBL = "Current credit value in credit currency
AMTBL_WAERK = "Current credit value in document currency
KWKKG = "
KWKKG_WAERK = "

TABLES
XVBAP = "Items
XVBAPF = "Summarized flow
XVBFA = "Flow
XVBKD = "Business data
XVBUP = "Item status
* XFPLA = "Billing Plan
* XFPLT = "
.



IMPORTING Parameters details for SD_CREDIT_VALUE_ORDER

POSNR - Item Number

Data type: VBAP-POSNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

VBAK - Sales Document

Data type: VBAK
Optional: No
Call by Reference: No ( called with pass by value option)

FREIGABE - Credit value for release ('X') or display (' ')

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_SORTED -

Data type: BOOLEAN
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for SD_CREDIT_VALUE_ORDER

AMTBL - Current credit value in credit currency

Data type: VBAK-AMTBL
Optional: No
Call by Reference: No ( called with pass by value option)

AMTBL_WAERK - Current credit value in document currency

Data type: VBAK-AMTBL
Optional: No
Call by Reference: No ( called with pass by value option)

KWKKG -

Data type: VBKRED-KWKKG
Optional: No
Call by Reference: No ( called with pass by value option)

KWKKG_WAERK -

Data type: VBKRED-KWKKG
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SD_CREDIT_VALUE_ORDER

XVBAP - Items

Data type: VBAPVB
Optional: No
Call by Reference: No ( called with pass by value option)

XVBAPF - Summarized flow

Data type: VBAPF
Optional: No
Call by Reference: No ( called with pass by value option)

XVBFA - Flow

Data type: VBFAVB
Optional: No
Call by Reference: No ( called with pass by value option)

XVBKD - Business data

Data type: VBKDVB
Optional: No
Call by Reference: No ( called with pass by value option)

XVBUP - Item status

Data type: VBUPVB
Optional: No
Call by Reference: No ( called with pass by value option)

XFPLA - Billing Plan

Data type: FPLAVB
Optional: Yes
Call by Reference: Yes

XFPLT -

Data type: FPLTVB
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for SD_CREDIT_VALUE_ORDER Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_amtbl  TYPE VBAK-AMTBL, "   
lv_posnr  TYPE VBAP-POSNR, "   SPACE
lt_xvbap  TYPE STANDARD TABLE OF VBAPVB, "   
lv_vbak  TYPE VBAK, "   
lt_xvbapf  TYPE STANDARD TABLE OF VBAPF, "   
lv_amtbl_waerk  TYPE VBAK-AMTBL, "   
lv_kwkkg  TYPE VBKRED-KWKKG, "   
lt_xvbfa  TYPE STANDARD TABLE OF VBFAVB, "   
lv_freigabe  TYPE VBFAVB, "   SPACE
lt_xvbkd  TYPE STANDARD TABLE OF VBKDVB, "   
lv_iv_sorted  TYPE BOOLEAN, "   SPACE
lv_kwkkg_waerk  TYPE VBKRED-KWKKG, "   
lt_xvbup  TYPE STANDARD TABLE OF VBUPVB, "   
lt_xfpla  TYPE STANDARD TABLE OF FPLAVB, "   
lt_xfplt  TYPE STANDARD TABLE OF FPLTVB. "   

  CALL FUNCTION 'SD_CREDIT_VALUE_ORDER'  "
    EXPORTING
         POSNR = lv_posnr
         VBAK = lv_vbak
         FREIGABE = lv_freigabe
         IV_SORTED = lv_iv_sorted
    IMPORTING
         AMTBL = lv_amtbl
         AMTBL_WAERK = lv_amtbl_waerk
         KWKKG = lv_kwkkg
         KWKKG_WAERK = lv_kwkkg_waerk
    TABLES
         XVBAP = lt_xvbap
         XVBAPF = lt_xvbapf
         XVBFA = lt_xvbfa
         XVBKD = lt_xvbkd
         XVBUP = lt_xvbup
         XFPLA = lt_xfpla
         XFPLT = lt_xfplt
. " SD_CREDIT_VALUE_ORDER




ABAP code using 7.40 inline data declarations to call FM SD_CREDIT_VALUE_ORDER

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single AMTBL FROM VBAK INTO @DATA(ld_amtbl).
 
"SELECT single POSNR FROM VBAP INTO @DATA(ld_posnr).
DATA(ld_posnr) = ' '.
 
 
 
 
"SELECT single AMTBL FROM VBAK INTO @DATA(ld_amtbl_waerk).
 
"SELECT single KWKKG FROM VBKRED INTO @DATA(ld_kwkkg).
 
 
DATA(ld_freigabe) = ' '.
 
 
DATA(ld_iv_sorted) = ' '.
 
"SELECT single KWKKG FROM VBKRED INTO @DATA(ld_kwkkg_waerk).
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!