SAP FCO_REWORK_IN_DOCUMENT_WRITE Function Module for









FCO_REWORK_IN_DOCUMENT_WRITE is a standard fco rework in document write 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 fco rework in document write FM, simply by entering the name FCO_REWORK_IN_DOCUMENT_WRITE into the relevant SAP transaction such as SE37 or SE38.

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



Function FCO_REWORK_IN_DOCUMENT_WRITE 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 'FCO_REWORK_IN_DOCUMENT_WRITE'"
EXPORTING
I_FCO_REW_OUT_DOC = "
I_SCRAP_FLAG = "
I_NGRND = "
I_RESPCC = "
I_NOTIF_NUMBER = "
* I_BUDAT = SY-DATLO "
* I_BLDAT = SY-DATLO "
* I_USNAM = SY-UNAME "
I_REW_IN_QTY = "
I_REWORK_COMPL = "

IMPORTING
E_BELNR = "
E_FCO_DOC_HEAD = "

TABLES
ET_CPZP_GR = "

EXCEPTIONS
NO_DOCUMENT_NUMBER = 1 INTERNAL_ERROR = 2 LOCKED = 3 ERROR_AT_GR = 4
.



IMPORTING Parameters details for FCO_REWORK_IN_DOCUMENT_WRITE

I_FCO_REW_OUT_DOC -

Data type: FCO_DOC_HEAD
Optional: No
Call by Reference: Yes

I_SCRAP_FLAG -

Data type: C
Optional: No
Call by Reference: Yes

I_NGRND -

Data type: FCO_REWORK_REASON
Optional: No
Call by Reference: Yes

I_RESPCC -

Data type: KOSTL
Optional: No
Call by Reference: Yes

I_NOTIF_NUMBER -

Data type: QMNUM
Optional: No
Call by Reference: Yes

I_BUDAT -

Data type: BUDAT
Default: SY-DATLO
Optional: Yes
Call by Reference: Yes

I_BLDAT -

Data type: CO_BLDAT
Default: SY-DATLO
Optional: Yes
Call by Reference: Yes

I_USNAM -

Data type: USNAM
Default: SY-UNAME
Optional: Yes
Call by Reference: Yes

I_REW_IN_QTY -

Data type: FCO_RBQUANT
Optional: No
Call by Reference: Yes

I_REWORK_COMPL -

Data type: FCO_REWORK_COMPL
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for FCO_REWORK_IN_DOCUMENT_WRITE

E_BELNR -

Data type: FCO_BELNR
Optional: No
Call by Reference: Yes

E_FCO_DOC_HEAD -

Data type: FCO_DOC_HEAD
Optional: No
Call by Reference: Yes

TABLES Parameters details for FCO_REWORK_IN_DOCUMENT_WRITE

ET_CPZP_GR -

Data type: CPZP
Optional: No
Call by Reference: Yes

EXCEPTIONS details

NO_DOCUMENT_NUMBER -

Data type:
Optional: No
Call by Reference: Yes

INTERNAL_ERROR -

Data type:
Optional: No
Call by Reference: Yes

LOCKED -

Data type:
Optional: No
Call by Reference: Yes

ERROR_AT_GR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for FCO_REWORK_IN_DOCUMENT_WRITE 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_belnr  TYPE FCO_BELNR, "   
lt_et_cpzp_gr  TYPE STANDARD TABLE OF CPZP, "   
lv_i_fco_rew_out_doc  TYPE FCO_DOC_HEAD, "   
lv_no_document_number  TYPE FCO_DOC_HEAD, "   
lv_i_scrap_flag  TYPE C, "   
lv_i_ngrnd  TYPE FCO_REWORK_REASON, "   
lv_e_fco_doc_head  TYPE FCO_DOC_HEAD, "   
lv_internal_error  TYPE FCO_DOC_HEAD, "   
lv_locked  TYPE FCO_DOC_HEAD, "   
lv_i_respcc  TYPE KOSTL, "   
lv_error_at_gr  TYPE KOSTL, "   
lv_i_notif_number  TYPE QMNUM, "   
lv_i_budat  TYPE BUDAT, "   SY-DATLO
lv_i_bldat  TYPE CO_BLDAT, "   SY-DATLO
lv_i_usnam  TYPE USNAM, "   SY-UNAME
lv_i_rew_in_qty  TYPE FCO_RBQUANT, "   
lv_i_rework_compl  TYPE FCO_REWORK_COMPL. "   

  CALL FUNCTION 'FCO_REWORK_IN_DOCUMENT_WRITE'  "
    EXPORTING
         I_FCO_REW_OUT_DOC = lv_i_fco_rew_out_doc
         I_SCRAP_FLAG = lv_i_scrap_flag
         I_NGRND = lv_i_ngrnd
         I_RESPCC = lv_i_respcc
         I_NOTIF_NUMBER = lv_i_notif_number
         I_BUDAT = lv_i_budat
         I_BLDAT = lv_i_bldat
         I_USNAM = lv_i_usnam
         I_REW_IN_QTY = lv_i_rew_in_qty
         I_REWORK_COMPL = lv_i_rework_compl
    IMPORTING
         E_BELNR = lv_e_belnr
         E_FCO_DOC_HEAD = lv_e_fco_doc_head
    TABLES
         ET_CPZP_GR = lt_et_cpzp_gr
    EXCEPTIONS
        NO_DOCUMENT_NUMBER = 1
        INTERNAL_ERROR = 2
        LOCKED = 3
        ERROR_AT_GR = 4
. " FCO_REWORK_IN_DOCUMENT_WRITE




ABAP code using 7.40 inline data declarations to call FM FCO_REWORK_IN_DOCUMENT_WRITE

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.

 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_i_budat) = SY-DATLO.
 
DATA(ld_i_bldat) = SY-DATLO.
 
DATA(ld_i_usnam) = SY-UNAME.
 
 
 


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!