SAP J_3RS_GET_SD_REF_DOC Function Module for Copying data from SD to CCD









J_3RS_GET_SD_REF_DOC is a standard j 3rs get sd ref doc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Copying data from SD to CCD 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 3rs get sd ref doc FM, simply by entering the name J_3RS_GET_SD_REF_DOC into the relevant SAP transaction such as SE37 or SE38.

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



Function J_3RS_GET_SD_REF_DOC 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_3RS_GET_SD_REF_DOC'"Copying data from SD to CCD
EXPORTING
P_COPYFROM = "Structure of of SD objects for creation of CCD with ref.
* P_BUKRS = "Company Code
* P_WAERS = "Currency Key
P_CCDITEM_NUM = "Target CCD Item Number
* P_ITEMS_SCREEN = "General Flag

IMPORTING
P_HEADER = "Full list of CCD header fields
PT_ITEMS = "CCD Extended Items
PT_SUBITEMS = "CCD Extended Subitems
PT_MSG_TAB = "Check messages

EXCEPTIONS
NO_DOC_FOUND = 1 WRONG_CURR = 2 WRONG_BUKRS = 3 NO_ITEMS_SELECTED = 4 LONG_NETWR = 5
.



IMPORTING Parameters details for J_3RS_GET_SD_REF_DOC

P_COPYFROM - Structure of of SD objects for creation of CCD with ref.

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

P_BUKRS - Company Code

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

P_WAERS - Currency Key

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

P_CCDITEM_NUM - Target CCD Item Number

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

P_ITEMS_SCREEN - General Flag

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

EXPORTING Parameters details for J_3RS_GET_SD_REF_DOC

P_HEADER - Full list of CCD header fields

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

PT_ITEMS - CCD Extended Items

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

PT_SUBITEMS - CCD Extended Subitems

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

PT_MSG_TAB - Check messages

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

EXCEPTIONS details

NO_DOC_FOUND - No document found in DB

Data type:
Optional: No
Call by Reference: Yes

WRONG_CURR - Currency differs from the required one

Data type:
Optional: No
Call by Reference: Yes

WRONG_BUKRS - Company Code differs from the required one

Data type:
Optional: No
Call by Reference: Yes

NO_ITEMS_SELECTED - No document items selected

Data type:
Optional: No
Call by Reference: Yes

LONG_NETWR - Too long value not copied to item-netwr

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for J_3RS_GET_SD_REF_DOC 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_p_header  TYPE J_3RSCCDHEADER_TOTAL, "   
lv_p_copyfrom  TYPE J_3RSCCD_COPYFROM, "   
lv_no_doc_found  TYPE J_3RSCCD_COPYFROM, "   
lv_p_bukrs  TYPE BUKRS, "   
lv_pt_items  TYPE J_3RSCCDITEM_TOTALS, "   
lv_wrong_curr  TYPE J_3RSCCDITEM_TOTALS, "   
lv_p_waers  TYPE WAERS, "   
lv_pt_subitems  TYPE J_3RSCCDSUB_TOTALS, "   
lv_wrong_bukrs  TYPE J_3RSCCDSUB_TOTALS, "   
lv_pt_msg_tab  TYPE J_3RS_MSGS, "   
lv_p_ccditem_num  TYPE J_3RS_CCDITEMID, "   
lv_no_items_selected  TYPE J_3RS_CCDITEMID, "   
lv_long_netwr  TYPE J_3RS_CCDITEMID, "   
lv_p_items_screen  TYPE FLAG. "   

  CALL FUNCTION 'J_3RS_GET_SD_REF_DOC'  "Copying data from SD to CCD
    EXPORTING
         P_COPYFROM = lv_p_copyfrom
         P_BUKRS = lv_p_bukrs
         P_WAERS = lv_p_waers
         P_CCDITEM_NUM = lv_p_ccditem_num
         P_ITEMS_SCREEN = lv_p_items_screen
    IMPORTING
         P_HEADER = lv_p_header
         PT_ITEMS = lv_pt_items
         PT_SUBITEMS = lv_pt_subitems
         PT_MSG_TAB = lv_pt_msg_tab
    EXCEPTIONS
        NO_DOC_FOUND = 1
        WRONG_CURR = 2
        WRONG_BUKRS = 3
        NO_ITEMS_SELECTED = 4
        LONG_NETWR = 5
. " J_3RS_GET_SD_REF_DOC




ABAP code using 7.40 inline data declarations to call FM J_3RS_GET_SD_REF_DOC

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!