SAP GET_RULE_DETAIL Function Module for Get Billing Method Details (T8J0G)









GET_RULE_DETAIL is a standard get rule detail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get Billing Method Details (T8J0G) 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 rule detail FM, simply by entering the name GET_RULE_DETAIL into the relevant SAP transaction such as SE37 or SE38.

Function Group: GJVG
Program Name: SAPLGJVG
Main Program: SAPLGJVG
Appliation area: G
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function GET_RULE_DETAIL 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_RULE_DETAIL'"Get Billing Method Details (T8J0G)
EXPORTING
I_BILLING_METHOD = "Billing Method
I_COMPANY = "
I_ITEMTYPE = "Item Type
I_JVFUNC = "Joint Venture Function
I_RECID = "Recovery Indicator

IMPORTING
E_RECORD_T8J0G = "Export: Table T8J0G Field String

EXCEPTIONS
INV_BILLMETH = 1 INV_FUNCTION = 2 NO_RULE_DETAIL = 3
.



IMPORTING Parameters details for GET_RULE_DETAIL

I_BILLING_METHOD - Billing Method

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

I_COMPANY -

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

I_ITEMTYPE - Item Type

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

I_JVFUNC - Joint Venture Function

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

I_RECID - Recovery Indicator

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

EXPORTING Parameters details for GET_RULE_DETAIL

E_RECORD_T8J0G - Export: Table T8J0G Field String

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

EXCEPTIONS details

INV_BILLMETH - Invalid Billing Method

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

INV_FUNCTION - Invalid JV Function

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

NO_RULE_DETAIL - No Rule Detail Found

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

Copy and paste ABAP code example for GET_RULE_DETAIL 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_inv_billmeth  TYPE STRING, "   
lv_e_record_t8j0g  TYPE STRING, "   
lv_i_billing_method  TYPE T8J0G-BMETHOD, "   
lv_i_company  TYPE T8J0G-BUKRS, "   
lv_inv_function  TYPE T8J0G, "   
lv_i_itemtype  TYPE T8J0G-ITEMTYPE, "   
lv_no_rule_detail  TYPE T8J0G, "   
lv_i_jvfunc  TYPE T8J0G-JVFUNC, "   
lv_i_recid  TYPE T8J0G-RECID. "   

  CALL FUNCTION 'GET_RULE_DETAIL'  "Get Billing Method Details (T8J0G)
    EXPORTING
         I_BILLING_METHOD = lv_i_billing_method
         I_COMPANY = lv_i_company
         I_ITEMTYPE = lv_i_itemtype
         I_JVFUNC = lv_i_jvfunc
         I_RECID = lv_i_recid
    IMPORTING
         E_RECORD_T8J0G = lv_e_record_t8j0g
    EXCEPTIONS
        INV_BILLMETH = 1
        INV_FUNCTION = 2
        NO_RULE_DETAIL = 3
. " GET_RULE_DETAIL




ABAP code using 7.40 inline data declarations to call FM GET_RULE_DETAIL

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 BMETHOD FROM T8J0G INTO @DATA(ld_i_billing_method).
 
"SELECT single BUKRS FROM T8J0G INTO @DATA(ld_i_company).
 
 
"SELECT single ITEMTYPE FROM T8J0G INTO @DATA(ld_i_itemtype).
 
 
"SELECT single JVFUNC FROM T8J0G INTO @DATA(ld_i_jvfunc).
 
"SELECT single RECID FROM T8J0G INTO @DATA(ld_i_recid).
 


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!