SAP GET_POSTING_RULE Function Module for NOTRANSL: Bestimmung der Buchungsregel ueber ext. Vorgang, Buchungstext od









GET_POSTING_RULE is a standard get posting rule SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Bestimmung der Buchungsregel ueber ext. Vorgang, Buchungstext od processing and below is the pattern details for this FM, 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 get posting rule FM, simply by entering the name GET_POSTING_RULE into the relevant SAP transaction such as SE37 or SE38.

Function Group: F030
Program Name: SAPLF030
Main Program: SAPLF030
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function GET_POSTING_RULE 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 'GET_POSTING_RULE'"NOTRANSL: Bestimmung der Buchungsregel ueber ext. Vorgang, Buchungstext od
EXPORTING
* I_VORGC = "External transaction
* I_BUTXT = "Posting Text
* I_TEXTS = "
I_VOZPM = "+/- Sign
I_VGTYP = "Trans. Cat.
* I_VGEXT = "External business transaction
* I_USING_DEFAULT = 'X' "

IMPORTING
E_VGEXT = "
E_VGINT = "Posting Rule
E_INTAG = "Interpretation algorithm
E_VGSAP = "SAP bank transaction
E_PFORM = "Processing Type
E_USING_DEFAULT = "
E_DADET = "

EXCEPTIONS
NOT_FOUND = 1 INPUT_WRONG = 2
.



IMPORTING Parameters details for GET_POSTING_RULE

I_VORGC - External transaction

Data type: FEBEP-VORGC
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BUTXT - Posting Text

Data type: FEBEP-BUTXT
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TEXTS -

Data type: FEBEP-TEXTS
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VOZPM - +/- Sign

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

I_VGTYP - Trans. Cat.

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

I_VGEXT - External business transaction

Data type: FEBEP-VGEXT
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_USING_DEFAULT -

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

EXPORTING Parameters details for GET_POSTING_RULE

E_VGEXT -

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

E_VGINT - Posting Rule

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

E_INTAG - Interpretation algorithm

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

E_VGSAP - SAP bank transaction

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

E_PFORM - Processing Type

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

E_USING_DEFAULT -

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

E_DADET -

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

EXCEPTIONS details

NOT_FOUND -

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

INPUT_WRONG - No entry

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

Copy and paste ABAP code example for GET_POSTING_RULE 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_e_vgext  TYPE FEBEP-VGEXT, "   
lv_i_vorgc  TYPE FEBEP-VORGC, "   
lv_not_found  TYPE FEBEP, "   
lv_e_vgint  TYPE FEBEP-VGINT, "   
lv_i_butxt  TYPE FEBEP-BUTXT, "   
lv_input_wrong  TYPE FEBEP, "   
lv_e_intag  TYPE FEBEP-INTAG, "   
lv_i_texts  TYPE FEBEP-TEXTS, "   
lv_e_vgsap  TYPE FEBEP-VGSAP, "   
lv_i_vozpm  TYPE T028G-VOZPM, "   
lv_e_pform  TYPE FEBEP-PFORM, "   
lv_i_vgtyp  TYPE FEBKO-VGTYP, "   
lv_i_vgext  TYPE FEBEP-VGEXT, "   
lv_e_using_default  TYPE BOOLE_D, "   
lv_e_dadet  TYPE DSART_DET, "   
lv_i_using_default  TYPE BOOLE_D. "   'X'

  CALL FUNCTION 'GET_POSTING_RULE'  "NOTRANSL: Bestimmung der Buchungsregel ueber ext. Vorgang, Buchungstext od
    EXPORTING
         I_VORGC = lv_i_vorgc
         I_BUTXT = lv_i_butxt
         I_TEXTS = lv_i_texts
         I_VOZPM = lv_i_vozpm
         I_VGTYP = lv_i_vgtyp
         I_VGEXT = lv_i_vgext
         I_USING_DEFAULT = lv_i_using_default
    IMPORTING
         E_VGEXT = lv_e_vgext
         E_VGINT = lv_e_vgint
         E_INTAG = lv_e_intag
         E_VGSAP = lv_e_vgsap
         E_PFORM = lv_e_pform
         E_USING_DEFAULT = lv_e_using_default
         E_DADET = lv_e_dadet
    EXCEPTIONS
        NOT_FOUND = 1
        INPUT_WRONG = 2
. " GET_POSTING_RULE




ABAP code using 7.40 inline data declarations to call FM GET_POSTING_RULE

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 VGEXT FROM FEBEP INTO @DATA(ld_e_vgext).
 
"SELECT single VORGC FROM FEBEP INTO @DATA(ld_i_vorgc).
 
 
"SELECT single VGINT FROM FEBEP INTO @DATA(ld_e_vgint).
 
"SELECT single BUTXT FROM FEBEP INTO @DATA(ld_i_butxt).
 
 
"SELECT single INTAG FROM FEBEP INTO @DATA(ld_e_intag).
 
"SELECT single TEXTS FROM FEBEP INTO @DATA(ld_i_texts).
 
"SELECT single VGSAP FROM FEBEP INTO @DATA(ld_e_vgsap).
 
"SELECT single VOZPM FROM T028G INTO @DATA(ld_i_vozpm).
 
"SELECT single PFORM FROM FEBEP INTO @DATA(ld_e_pform).
 
"SELECT single VGTYP FROM FEBKO INTO @DATA(ld_i_vgtyp).
 
"SELECT single VGEXT FROM FEBEP INTO @DATA(ld_i_vgext).
 
 
 
DATA(ld_i_using_default) = 'X'.
 


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!