SAP J_1B_SD_CFOP_REDET Function Module for CFOP Redetermination









J_1B_SD_CFOP_REDET is a standard j 1b sd cfop redet SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for CFOP Redetermination 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 j 1b sd cfop redet FM, simply by entering the name J_1B_SD_CFOP_REDET into the relevant SAP transaction such as SE37 or SE38.

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



Function J_1B_SD_CFOP_REDET 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 'J_1B_SD_CFOP_REDET'"CFOP Redetermination
EXPORTING
ORDER_TYPE = "Sales Document Types
BWTAR = "Valuation Type
* I_VBRP = "Billing Document: Item Data
* I_LIPS = "SD document: Delivery: Item data
* I_VBAP = "Sales Document: Item Data
* I_VBRK = "Billing Document: Header Data
* I_LIKP = "SD Document: Delivery Header Data
* I_VBAK = "Sales Document: Header Data
ITEM_CATEGORY = "Sales document item category
MATERIAL = "Material Number
PLANT = "Plant (Own or External)
DATE_OLD = "Valid-from Date of CFOP Version
DATE_NEW = "Valid-from Date of CFOP Version
DOCUMENT_NR = "Sales Document
LINE_NR = "Sales Document Item
COMPANY = "Company code to be billed

IMPORTING
CFOP = "CFOP code and extension

TABLES
* T_VBPA = "Sales Document: Partner

EXCEPTIONS
NF_TYPE_NOT_FOUND = 1 ITEM_CATEGORY_NOT_FOUND = 2 CFOP_TEXT_NOT_FOUND = 3
.



IMPORTING Parameters details for J_1B_SD_CFOP_REDET

ORDER_TYPE - Sales Document Types

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

BWTAR - Valuation Type

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

I_VBRP - Billing Document: Item Data

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

I_LIPS - SD document: Delivery: Item data

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

I_VBAP - Sales Document: Item Data

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

I_VBRK - Billing Document: Header Data

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

I_LIKP - SD Document: Delivery Header Data

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

I_VBAK - Sales Document: Header Data

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

ITEM_CATEGORY - Sales document item category

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

MATERIAL - Material Number

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

PLANT - Plant (Own or External)

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

DATE_OLD - Valid-from Date of CFOP Version

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

DATE_NEW - Valid-from Date of CFOP Version

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

DOCUMENT_NR - Sales Document

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

LINE_NR - Sales Document Item

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

COMPANY - Company code to be billed

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

EXPORTING Parameters details for J_1B_SD_CFOP_REDET

CFOP - CFOP code and extension

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

TABLES Parameters details for J_1B_SD_CFOP_REDET

T_VBPA - Sales Document: Partner

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

EXCEPTIONS details

NF_TYPE_NOT_FOUND - Nota Fiscal Type not found

Data type:
Optional: No
Call by Reference: Yes

ITEM_CATEGORY_NOT_FOUND - Item Category not found

Data type:
Optional: No
Call by Reference: Yes

CFOP_TEXT_NOT_FOUND - CFOP text not found

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for J_1B_SD_CFOP_REDET 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_cfop  TYPE VBAP-J_1BCFOP, "   
lt_t_vbpa  TYPE STANDARD TABLE OF VBPA, "   
lv_order_type  TYPE TVAK, "   
lv_nf_type_not_found  TYPE TVAK, "   
lv_bwtar  TYPE VBAP-BWTAR, "   
lv_i_vbrp  TYPE VBRP, "   
lv_i_lips  TYPE LIPS, "   
lv_i_vbap  TYPE VBAP, "   
lv_i_vbrk  TYPE VBRK, "   
lv_i_likp  TYPE LIKP, "   
lv_i_vbak  TYPE VBAK, "   
lv_item_category  TYPE VBAP-PSTYV, "   
lv_item_category_not_found  TYPE VBAP, "   
lv_material  TYPE MARA-MATNR, "   
lv_cfop_text_not_found  TYPE MARA, "   
lv_plant  TYPE VBAP-WERKS, "   
lv_date_old  TYPE DATS, "   
lv_date_new  TYPE DATS, "   
lv_document_nr  TYPE VBAP-VBELN, "   
lv_line_nr  TYPE VBAP-POSNR, "   
lv_company  TYPE VBAK-BUKRS_VF. "   

  CALL FUNCTION 'J_1B_SD_CFOP_REDET'  "CFOP Redetermination
    EXPORTING
         ORDER_TYPE = lv_order_type
         BWTAR = lv_bwtar
         I_VBRP = lv_i_vbrp
         I_LIPS = lv_i_lips
         I_VBAP = lv_i_vbap
         I_VBRK = lv_i_vbrk
         I_LIKP = lv_i_likp
         I_VBAK = lv_i_vbak
         ITEM_CATEGORY = lv_item_category
         MATERIAL = lv_material
         PLANT = lv_plant
         DATE_OLD = lv_date_old
         DATE_NEW = lv_date_new
         DOCUMENT_NR = lv_document_nr
         LINE_NR = lv_line_nr
         COMPANY = lv_company
    IMPORTING
         CFOP = lv_cfop
    TABLES
         T_VBPA = lt_t_vbpa
    EXCEPTIONS
        NF_TYPE_NOT_FOUND = 1
        ITEM_CATEGORY_NOT_FOUND = 2
        CFOP_TEXT_NOT_FOUND = 3
. " J_1B_SD_CFOP_REDET




ABAP code using 7.40 inline data declarations to call FM J_1B_SD_CFOP_REDET

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 J_1BCFOP FROM VBAP INTO @DATA(ld_cfop).
 
 
 
 
"SELECT single BWTAR FROM VBAP INTO @DATA(ld_bwtar).
 
 
 
 
 
 
 
"SELECT single PSTYV FROM VBAP INTO @DATA(ld_item_category).
 
 
"SELECT single MATNR FROM MARA INTO @DATA(ld_material).
 
 
"SELECT single WERKS FROM VBAP INTO @DATA(ld_plant).
 
 
 
"SELECT single VBELN FROM VBAP INTO @DATA(ld_document_nr).
 
"SELECT single POSNR FROM VBAP INTO @DATA(ld_line_nr).
 
"SELECT single BUKRS_VF FROM VBAK INTO @DATA(ld_company).
 


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!