SAP Function Modules

G_TRANS_PLAN_PARA_TO_PLAN_TASK SAP Function module







G_TRANS_PLAN_PARA_TO_PLAN_TASK 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 G_TRANS_PLAN_PARA_TO_PLAN_TASK into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM G_TRANS_PLAN_PARA_TO_PLAN_TASK - G TRANS PLAN PARA TO PLAN TASK





CALL FUNCTION 'G_TRANS_PLAN_PARA_TO_PLAN_TASK' "
  EXPORTING
    rplan =                     " t820-rplan
    rldnr =                     " glu1-rldnr
    rvers =                     " glu1-rvers
    orgunit =                   "
    ryear =                     " glu1-ryear
    runit =                     " glu1-runit
    rtcur =                     " glu1-rtcur
    form =                      " tkes1-form
    plprof =                    " tka50-plprof
  IMPORTING
    docty =                     " docty
    cutyp =                     " kurst
  TABLES
    dimensions =                " gppdimensions
    values =                    " gppvalues
  EXCEPTIONS
    PLANP_NOT_EXISTENT = 1      "
    TABLE_NOT_INST_FOR_PLAN = 2  "
    DIM_NOT_BASIC_SET = 3       "
    NO_KEYFIELD_DEFINED = 4     "
    DIMENSION_NOT_ALLOWED = 5   "
    LEDGER_NOT_ALLOWED = 6      "
    CONFIG_ERROR = 7            "
    .  "  G_TRANS_PLAN_PARA_TO_PLAN_TASK

ABAP code example for Function Module G_TRANS_PLAN_PARA_TO_PLAN_TASK





The ABAP code below is a full code listing to execute function module G_TRANS_PLAN_PARA_TO_PLAN_TASK 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_docty  TYPE DOCTY ,
ld_cutyp  TYPE KURST ,
it_dimensions  TYPE STANDARD TABLE OF GPPDIMENSIONS,"TABLES PARAM
wa_dimensions  LIKE LINE OF it_dimensions ,
it_values  TYPE STANDARD TABLE OF GPPVALUES,"TABLES PARAM
wa_values  LIKE LINE OF it_values .


SELECT single RPLAN
FROM T820
INTO @DATA(ld_rplan).


DATA(ld_rldnr) = some text here

DATA(ld_rvers) = some text here
DATA(ld_orgunit) = 'some text here'.

DATA(ld_ryear) = Check type of data required

DATA(ld_runit) = Check type of data required

DATA(ld_rtcur) = Check type of data required

SELECT single FORM
FROM TKES1
INTO @DATA(ld_form).


SELECT single PLPROF
FROM TKA50
INTO @DATA(ld_plprof).


"populate fields of struture and append to itab
append wa_dimensions to it_dimensions.

"populate fields of struture and append to itab
append wa_values to it_values. . CALL FUNCTION 'G_TRANS_PLAN_PARA_TO_PLAN_TASK' EXPORTING rplan = ld_rplan rldnr = ld_rldnr rvers = ld_rvers orgunit = ld_orgunit ryear = ld_ryear runit = ld_runit rtcur = ld_rtcur form = ld_form plprof = ld_plprof IMPORTING docty = ld_docty cutyp = ld_cutyp TABLES dimensions = it_dimensions values = it_values EXCEPTIONS PLANP_NOT_EXISTENT = 1 TABLE_NOT_INST_FOR_PLAN = 2 DIM_NOT_BASIC_SET = 3 NO_KEYFIELD_DEFINED = 4 DIMENSION_NOT_ALLOWED = 5 LEDGER_NOT_ALLOWED = 6 CONFIG_ERROR = 7 . " G_TRANS_PLAN_PARA_TO_PLAN_TASK
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here 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_docty  TYPE DOCTY ,
ld_rplan  TYPE T820-RPLAN ,
it_dimensions  TYPE STANDARD TABLE OF GPPDIMENSIONS ,
wa_dimensions  LIKE LINE OF it_dimensions,
ld_cutyp  TYPE KURST ,
ld_rldnr  TYPE GLU1-RLDNR ,
it_values  TYPE STANDARD TABLE OF GPPVALUES ,
wa_values  LIKE LINE OF it_values,
ld_rvers  TYPE GLU1-RVERS ,
ld_orgunit  TYPE STRING ,
ld_ryear  TYPE GLU1-RYEAR ,
ld_runit  TYPE GLU1-RUNIT ,
ld_rtcur  TYPE GLU1-RTCUR ,
ld_form  TYPE TKES1-FORM ,
ld_plprof  TYPE TKA50-PLPROF .


SELECT single RPLAN
FROM T820
INTO ld_rplan.


"populate fields of struture and append to itab
append wa_dimensions to it_dimensions.

ld_rldnr = some text here

"populate fields of struture and append to itab
append wa_values to it_values.

ld_rvers = some text here
ld_orgunit = 'some text here'.

ld_ryear = Check type of data required

ld_runit = Check type of data required

ld_rtcur = Check type of data required

SELECT single FORM
FROM TKES1
INTO ld_form.


SELECT single PLPROF
FROM TKA50
INTO ld_plprof.

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 G_TRANS_PLAN_PARA_TO_PLAN_TASK or its description.