SAP Function Modules

FC_POP_COPY_ITEM SAP Function module







FC_POP_COPY_ITEM is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name FC_POP_COPY_ITEM into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: FC01
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM FC_POP_COPY_ITEM - FC POP COPY ITEM





CALL FUNCTION 'FC_POP_COPY_ITEM' "
* EXPORTING
*   e_itclg = SPACE             " tf120-itclg
*   e_item_from = SPACE         " tf100-item
*   e_item_to = SPACE           " tf100-item
*   e_laenge = 10               "
*   e_text1 = SPACE             " fc01tab-text1
*   e_text2 = SPACE             " fc01tab-text2
*   e_text3 = SPACE             " fc01tab-text3
*   e_titel = SPACE             " fc01tab-titel
  IMPORTING
    i_answer =                  "
    i_itclg =                   " tf120-itclg
    i_item_from =               " tf100-item
    i_item_to =                 " tf100-item
    .  "  FC_POP_COPY_ITEM

ABAP code example for Function Module FC_POP_COPY_ITEM





The ABAP code below is a full code listing to execute function module FC_POP_COPY_ITEM including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_i_answer  TYPE STRING ,
ld_i_itclg  TYPE TF120-ITCLG ,
ld_i_item_from  TYPE TF100-ITEM ,
ld_i_item_to  TYPE TF100-ITEM .


SELECT single ITCLG
FROM TF120
INTO @DATA(ld_e_itclg).


SELECT single ITEM
FROM TF100
INTO @DATA(ld_e_item_from).


SELECT single ITEM
FROM TF100
INTO @DATA(ld_e_item_to).

DATA(ld_e_laenge) = 'some text here'.

DATA(ld_e_text1) = some text here

DATA(ld_e_text2) = some text here

DATA(ld_e_text3) = some text here

DATA(ld_e_titel) = some text here . CALL FUNCTION 'FC_POP_COPY_ITEM' * EXPORTING * e_itclg = ld_e_itclg * e_item_from = ld_e_item_from * e_item_to = ld_e_item_to * e_laenge = ld_e_laenge * e_text1 = ld_e_text1 * e_text2 = ld_e_text2 * e_text3 = ld_e_text3 * e_titel = ld_e_titel IMPORTING i_answer = ld_i_answer i_itclg = ld_i_itclg i_item_from = ld_i_item_from i_item_to = ld_i_item_to . " FC_POP_COPY_ITEM
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_i_answer  TYPE STRING ,
ld_e_itclg  TYPE TF120-ITCLG ,
ld_i_itclg  TYPE TF120-ITCLG ,
ld_e_item_from  TYPE TF100-ITEM ,
ld_i_item_from  TYPE TF100-ITEM ,
ld_e_item_to  TYPE TF100-ITEM ,
ld_i_item_to  TYPE TF100-ITEM ,
ld_e_laenge  TYPE STRING ,
ld_e_text1  TYPE FC01TAB-TEXT1 ,
ld_e_text2  TYPE FC01TAB-TEXT2 ,
ld_e_text3  TYPE FC01TAB-TEXT3 ,
ld_e_titel  TYPE FC01TAB-TITEL .


SELECT single ITCLG
FROM TF120
INTO ld_e_itclg.


SELECT single ITEM
FROM TF100
INTO ld_e_item_from.


SELECT single ITEM
FROM TF100
INTO ld_e_item_to.

ld_e_laenge = 'some text here'.

ld_e_text1 = some text here

ld_e_text2 = some text here

ld_e_text3 = some text here

ld_e_titel = some text here

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name FC_POP_COPY_ITEM or its description.