cancel
Showing results for 
Search instead for 
Did you mean: 

Field Level Routine

Former Member
0 Kudos

Hi Experts,

I am trying to bring fields from 1 dso into another dso in transformation 7.0. Appending is my scenario

DSO A - /BIC/AZFC_DS0500

DSO B - /BIC/AZCS_DNGD00 - /BIC/ZZAMT , /BIC/ZG_DATE

DSO C - /BIC/AZFC_DS1000

I have created C over A and have to bring above stated fields from B into C with all records to apply below stated logic

Amount Paid (Invoice)

For CD:- Consider amount (ZCSTR_DEMANDNOTE-DOC_AMT) where all documents in table ZCSTR_DEMANDNOTE is having Main Transaction (DFKKOP-HVORG): ZBILL and Sub Transaction (DFKKOP – TVORG) = 0021 and posting date is greater than and equal to ZCSTR_DEMANDNOTE -G_Date having Clearing Status (DFKKOP- AUGST) = 9 and Clearing reason (DFKKOP- AUGRD)     <>      5 and 6

I have declared start routine code as:

*$*$ begin of global - insert your declaration only below this line  *-*

data : /BIC/AZCS_DNGD00,/BIC/AZFC_DS1000.

TYPES: BEGIN OF ts_dso2,

         /BIC/ZZAMT  TYPE /BIC/OIZZAMT,

         /BIC/ZG_DATE  TYPE /BIC/OIZG_DATE,

       END OF ts_dso2.

DATA: it_dso2 TYPE STANDARD TABLE OF ts_dso2,

       Wa_dso2 type ts_dso2.

*$*$ begin of routine - insert your code only below this line

IF SOURCE_PACKAGE[] IS NOT INITIAL.

      SELECT /BIC/ZZAMT /BIC/ZG_DATE

      FROM /BIC/AZCS_DNGD00 INTO TABLE it_dso2

      FOR ALL ENTRIES IN SOURCE_PACKAGE

      WHERE /BIC/ZZDOC =  SOURCE_PACKAGE-FC_OPBEL.

      ENDIF.

When I execute the C, I see that the fields are added but no data has filled.

Do I have to write a routine at field level also? What m I missing here? Request you to provide the exact code if required.

Would appreciate if snapshots can be shared.

rgds

Imran

Accepted Solutions (0)

Answers (1)

Answers (1)

jagadeesh_mandepudi2
Active Contributor
0 Kudos

Hi

Yes, you need to write object level code to read internal table and assign to result.

Find the example code:

   READ TABLE IT_DSO2 INTO WA_DSO2 WITH KEY
           Object = SOURCE_FIELDS-object

           IF SY-SUBRC = 0.
  RESULT = WA_DSO2-object name.
ENDIF.

Jagadeesh.M

Former Member
0 Kudos

Hi,

I have applied this code

READ TABLE IT_DSO2 INTO WA_DSO2 WITH KEY

           /BIC/ZZAMT = SOURCE_FIELDS-/BIC/ZZAMT.

           IF SY-SUBRC = 0.

  RESULT = WA_DSO2-/BIC/ZZAMT.

ENDIF.

It throws error : E:Field "SOURCE_FIELDS-/BIC/ZZAMT" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement.

What did I miss?

rgds

jagadeesh_mandepudi2
Active Contributor
0 Kudos

Hi

Where clause should be the same in Start and field level and those key objects should be connected to those rule.

Jagadeesh

Former Member
0 Kudos

Hi,

I am sorry, still not getting it, I changed and applied this

READ TABLE IT_DSO2 INTO WA_DSO2 WITH KEY

           where /BIC/ZZDOC = SOURCE_FIELDS-FC_OPBEL.

           IF SY-SUBRC = 0.

  RESULT = WA_DSO2-object name.

ENDIF.

throws error : E:"/BIC/ZZDOC" is not expected

Please guide?

rgds

Imran

Former Member
0 Kudos

Hi,

You must define the correct join statement after "WITH KEY".

For this correct your start routine in order to use a correct key definition :

*$*$ begin of global - insert your declaration only below this line  *-*

data : /BIC/AZCS_DNGD00,/BIC/AZFC_DS1000.

TYPES: BEGIN OF ts_dso2,

        /BIC/ZZDOC TYPE /BIC/ZZDOC

         /BIC/ZZAMT  TYPE /BIC/OIZZAMT,

         /BIC/ZG_DATE  TYPE /BIC/OIZG_DATE,

       END OF ts_dso2.

DATA: it_dso2 TYPE STANDARD TABLE OF ts_dso2,

       Wa_dso2 type ts_dso2.

*$*$ begin of routine - insert your code only below this line

IF SOURCE_PACKAGE[] IS NOT INITIAL.

      SELECT /BIC/ZZAMT /BIC/ZG_DATE, /BIC/ZZDOC

      FROM /BIC/AZCS_DNGD00 INTO TABLE it_dso2

      FOR ALL ENTRIES IN SOURCE_PACKAGE

      WHERE /BIC/ZZDOC =  SOURCE_PACKAGE-FC_OPBEL.

      ENDIF.

And in tranfer rule :

READ TABLE IT_DSO2 INTO WA_DSO2 WITH KEY

          /BIC/ZZDOC = SOURCE_PACKAGE-FC_OPBEL.

           IF SY-SUBRC = 0.

  RESULT = WA_DSO2-/BIC/ZZAMT.

ENDIF.

Former Member
0 Kudos

Hi Imran,

You can try using the below code,in the start routine of the transformation from DSOA to DSOC, where we will be doing a lookup of DSOB.

** Define structure of fields required from DSOB

TYPES:BEGIN OF s_dsoB,

doc_num TYPE /bi0/oidoc_number,

hvorg TYPE /bi0/hvorg,

tvorg TYPE /bi0/tvorg,

g_date TYPE /bi0/ g_date

augst TYPE /bi0/ augst

augrd TYPE /bi0/ augrd

doc_amt TYPE /bi0/ doc_amt

EnD of s_dsoB.

lt_dsoB TYPE HASHED TABLE OF s_dsoB

                            WITH UNIQUE KEY doc_num.

ls_dsoB TYPE s_dsoB.

FORM routine_start CHANGING p_source_package TYPE _ty_t_sc_1(source package structure).

DATA: lt_source_package TYPE TABLE OF _ty_s_sc_1,
            wa_source_package
TYPE _ty_s_sc_1.

Select  hvorg ,tvorg posting date CS RS from dsoB into corresponding  fields of table lt_dsoB

For ALL ENTRIES IN p_source_package

Where doc_num = p_source_package- doc_num

And PD>= p_source_package- date(posting date)

And CS=9(Clearing Status)

And RS <>   5 and 6.( Clearing reason)

LOOP AT p_source_package INTO wa_source_package.

READ TABLE lt_dsoB INTO ls_dsoB
             
WITH TABLE KEY doc_num = p_source_package- doc_num.
           
IF sy-subrc EQ 0.
              wa_source_package-
doc_amt    = ls_dsoB –doc_amt.

end if.

CLEAR ls_dsoB.

MODIFY p_source_package FROM wa_source_package.
       
CLEAR wa_source_package.
     
ENDLOOP.

   
ENDFORM.  

Please replace In the above code with the appropriate names of the IO and their standard types.

Let me know If there are further queries.

Regards,

Preethi S

Former Member
0 Kudos

Hi Antoine,

I am still getting the error : E:Field "SOURCE_PACKAGE-FC_OPBEL" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement.

I have made the corrections that you recommended:

1. Also Added filed ZZDOC in DSO C along with code change at start routine.

2.Then I go to ZZAMT and then imply the field level routine.

3.Why is the system saying SOURCE_PACKAGE-FC_OPBEL" is unknown, when FC_OPBEL is a key field in DSO C?(ZZDOC is data field in DS0 2)

When you say "You must define the correct join statement after "WITH KEY".For this correct your start routine in order to use a correct key definition :"  does it mean that my start routine is incorrect?

What m I missing here, I really need to get this working?

rgds

Imran

Message was edited by: Imran Khan

jagadeesh_mandepudi2
Active Contributor
0 Kudos

Hi

You need to use SOURCE_FIELDS there if teh source is DSO.

Jagadeesh

Former Member
0 Kudos

Hi,

You mean in start routine I need to use:

IF SOURCE_PACKAGE[] IS NOT INITIAL.

      SELECT /BIC/ZZAMT /BIC/ZG_DATE /BIC/ZZDOC

      FROM /BIC/AZCS_DNGD00 INTO TABLE it_dso2

     FOR ALL ENTRIES IN SOURCE_FIELDS

      WHERE /BIC/ZZDOC =  SOURCE_FIELDS-FC_OPBEL.

      ENDIF.

instead of

IF SOURCE_PACKAGE[] IS NOT INITIAL.

      SELECT /BIC/ZZAMT /BIC/ZG_DATE /BIC/ZZDOC

      FROM /BIC/AZCS_DNGD00 INTO TABLE it_dso2

      FOR ALL ENTRIES IN SOURCE_package

      WHERE /BIC/ZZDOC =  SOURCE_package-FC_OPBEL.

      ENDIF.

and in field routine

READ TABLE IT_DSO2 INTO WA_DSO2 WITH KEY

          /BIC/ZZDOC = SOURCE_Field-FC_OPBEL.

           IF SY-SUBRC = 0.

  RESULT = WA_DSO2-/BIC/ZZAMT.

ENDIF.

rgds

Imran

jagadeesh_mandepudi2
Active Contributor
0 Kudos

Hi

Do following changes

IF SOURCE_PACKAGE[] IS NOT INITIAL.

      SELECT /BIC/ZZAMT /BIC/ZG_DATE /BIC/ZZDOC

      FROM /BIC/AZCS_DNGD00 INTO TABLE it_dso2

     FOR ALL ENTRIES IN SOURCE_PACKAGE

      WHERE /BIC/ZZDOC =  SOURCE_PACKAGE-FC_OPBEL.

      ENDIF.

and in field routine

READ TABLE IT_DSO2 INTO WA_DSO2 WITH KEY

          /BIC/ZZDOC = SOURCE_Field-FC_OPBEL.

           IF SY-SUBRC = 0.

  RESULT = WA_DSO2-/BIC/ZZAMT.

ENDIF.

Jagadeesh

Former Member
0 Kudos

Hi Jagadeesh,

I just keep getting the same msg :

DO I have to get OPBEL identified else where also as the msg states, when it is a key field in DSO C?

rgds

jagadeesh_mandepudi2
Active Contributor
0 Kudos

Hi

Did u mapped FC_OPBEL field to this rule and you have written SOURCE_FIELD but it FIELDS.

Your start routine is saved without errors i believe.

Jagadeesh.M

Former Member
0 Kudos

Hi Jagadeesh,

Routines saved fine at both levels, I mapped all 3 fields with OPBEL and activated transformation fine.

However when I upload the data thru DTP, it goes into failure and throws an exception in substep : Start Routine and highlights "SELECT /BIC/ZZAMT /BIC/ZG_DATE /BIC/ZZDOC"

Is the linking incorrect?

Please guide.

rgds

Imran

Former Member
0 Kudos

Hello Can anyone reply...waiting desperately for an answer.

Former Member
0 Kudos

Hi,

Add mapping FC_OPBEL to ZZAMT transfer rule.

(I think you need a BW consultant)

Antoine.

Former Member
0 Kudos

Hi Antoine,

Can u guide me with exact code and at what point do I apply this in the appending code?

READ TABLE IT_DSO2 INTO WA_DSO2 WITH KEY

          /BIC/ZZDOC = SOURCE_Field-FC_OPBEL.

           IF SY-SUBRC = 0.

  RESULT = WA_DSO2-/BIC/ZZAMT.

ENDIF.

I have to do this on my own in order to understand it myself. I firmly believe that I can do this on my own with all you helping.

Plz help.

rgds

Imran

Message was edited by: Imran Khan

Former Member
0 Kudos

Hi,

All source fields use in transfer rule routine have to be added in the source of transfer routine (Graphicaly) :

Former Member
0 Kudos

Hi,

This is the assignment I have done e.g. for ZZAMT.

I have done similar for ZG_DATE, ZZDOC.

Is this correct?

rgds

Former Member
0 Kudos

Yes it seems ok

Former Member
0 Kudos

Hi,

when I upload the data thru DTP, it goes into failure and throws an exception in substep of Start Routine and highlights "SELECT /BIC/ZZAMT /BIC/ZG_DATE /BIC/ZZDOC"

Why did this happen when activation of transformation was error less?

rgds

Imran

Former Member
0 Kudos

Could you give me screen shot of start routine and error

Former Member
0 Kudos

Hi,

Appending as required

Start Routine

*$*$ begin of global - insert your declaration only below this line  *-*

data : /BIC/AZCS_DNGD00,/BIC/AZFC_DS1000.

TYPES: BEGIN OF ts_dso2,

         /BIC/ZZDOC type  /BIC/OIZZDOC,

         /BIC/ZZAMT TYPE /BIC/OIZZAMT,

         /BIC/ZG_DATE TYPE /BIC/OIZG_DATE,

       END OF ts_dso2.

DATA: it_dso2 TYPE STANDARD TABLE OF ts_dso2,

       Wa_dso2 type ts_dso2.

*$*$ end of global - insert your declaration only before this line   *-*

*$*$ begin of routine - insert your code only below this line    *-*

  IF SOURCE_PACKAGE[] IS NOT INITIAL.

  SELECT /BIC/ZZAMT /BIC/ZG_DATE /BIC/ZZDOC

  FROM /BIC/AZCS_DNGD00 INTO TABLE it_dso2

  FOR ALL ENTRIES IN SOURCE_PACKAGE

  WHERE /BIC/ZZDOC =  SOURCE_PACKAGE-FC_OPBEL.

  ENDIF.

*--  fill table "MONITOR" with values of structure "MONITOR_REC"

rgds

Imran

Former Member
0 Kudos

Add break point and debug if syntax routine is correct (test syntax)

Former Member
0 Kudos

Hi,

Both Start routine & Field routine state no errors & I am able to activate the transformation .

rgds

Former Member
0 Kudos

Try to debug transformation with a break point in routine and see where is the error.

Former Member
0 Kudos

Hi Imran,

In the start routine one structure will be there with the name _ty_s_SC_1 and two more structures will be there with the names _ty_s_SC_1_full and _ty_s_TG_1_full these all structures should be same sometimes these structures may differ, SOURCE_FIELDS structure is always dependent on these structures.

i suggest u to copy the structure _ty_s_SC_1 and copy it two _ty_s_SC_1_full and _ty_s_TG_1_full structures.

try this one it may work.

regards,

chakri.

Former Member
0 Kudos

Hi Antoine,

I applied a break point at SELECT /BIC/ZZAMT /BIC/ZG_DATE /BIC/ZZDOC and then in DTP did a simulation on Serially in the dialog box. It prompts me with this screen

What should I do now?

rgds

Former Member
0 Kudos

Hi Chakri,

I can only find _ty_s_SC_1 in the start routine, none other has been found.

Please guide!

rgds

Former Member
0 Kudos

please check after the declaration of the _ty_s_SC_1, u can find the those two structures,

Former Member
0 Kudos

Hi,

Here is the whole code for your reference, I still did not see any of them,

PROGRAM trans_routine.

*---------------------------------------------------------------------*

*       CLASS routine DEFINITION

*---------------------------------------------------------------------*

*

*---------------------------------------------------------------------*

CLASS lcl_transform DEFINITION.

  PUBLIC SECTION.

*  Attributs

    DATA:

      p_check_master_data_exist

            TYPE RSODSOCHECKONLY READ-ONLY,

*-    Instance for getting request runtime attributs;

*     Available information: Refer to methods of

*     interface 'if_rsbk_request_admintab_view'

      p_r_request

            TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.

  PRIVATE SECTION.

    TYPE-POOLS: rsd, rstr.

*   Rule specific types

    TYPES:

      BEGIN OF _ty_s_SC_1,

*      InfoObject: 0LOGSYS Source System.

        LOGSYS           TYPE RSDLOGSYS,

*      InfoObject: 0FC_OPBEL Number of Document from FI-CA.

        FC_OPBEL           TYPE /BI0/OIFC_OPBEL,

*      InfoObject: 0FC_OPUPW Repetition in Document from FI-CA.

        FC_OPUPW           TYPE /BI0/OIFC_OPUPW,

*      InfoObject: 0FC_OPUPK Item Number in Document from FI-CA.

        FC_OPUPK           TYPE /BI0/OIFC_OPUPK,

*      InfoObject: 0FC_OPUPZ Subitem for a Partial Clearing in Document.

        FC_OPUPZ           TYPE /BI0/OIFC_OPUPZ,

*      InfoObject: 0RECORDMODE BW Delta Process: Update Mode.

        RECORDMODE           TYPE RODMUPDMOD,

*      InfoObject: 0COMP_CODE Company code.

        COMP_CODE           TYPE /BI0/OICOMP_CODE,

*      InfoObject: 0BUS_AREA Business area.

        BUS_AREA           TYPE /BI0/OIBUS_AREA,

*      InfoObject: 0SEGMENT Segment for Segmental Reporting.

        SEGMENT           TYPE /BI0/OISEGMENT,

*      InfoObject: 0BPARTNER Business Partner.

        BPARTNER           TYPE /BI0/OIBPARTNER,

*      InfoObject: 0FC_VTREF Reference Specifications from Contract.

        FC_VTREF           TYPE /BI0/OIFC_VTREF,

*      InfoObject: 0CACONT_ACC Contract Account (Partner-Independent Dat

*a).

        CACONT_ACC           TYPE /BI0/OICACONT_ACC,

*      InfoObject: 0FC_ABWBL Number of Grouping Object.

        FC_ABWBL           TYPE /BI0/OIFC_ABWBL,

*      InfoObject: 0FC_ABWTP Type of Grouping Object.

        FC_ABWTP           TYPE /BI0/OIFC_ABWTP,

*      InfoObject: 0CAMNTRANS Main Transaction Defines CoCode with Sub-T

*ransaction.

        CAMNTRANS           TYPE /BI0/OICAMNTRANS,

*      InfoObject: 0CASUBTRANS Sub-Transaction Defines Main Transaction

*with CoCode.

        CASUBTRANS           TYPE /BI0/OICASUBTRANS,

*      InfoObject: 0CAAPPLK Application Component.

        CAAPPLK           TYPE /BI0/OICAAPPLK,

*      InfoObject: 0DIVISION Division.

        DIVISION           TYPE /BI0/OIDIVISION,

*      InfoObject: 0GL_ACCOUNT G/L Account.

        GL_ACCOUNT           TYPE /BI0/OIGL_ACCOUNT,

*      InfoObject: 0CHRT_ACCTS Chart of accounts.

        CHRT_ACCTS           TYPE /BI0/OICHRT_ACCTS,

*      InfoObject: 0IS_TXCOD Tax Code.

        IS_TXCOD           TYPE /BI0/OIIS_TXCOD,

*      InfoObject: 0FC_STAKZ Type of Statistical Item.

        FC_STAKZ           TYPE /BI0/OIFC_STAKZ,

*      InfoObject: 0DOC_DATE Document Date.

        DOC_DATE           TYPE /BI0/OIDOC_DATE,

*      InfoObject: 0PSTNG_DATE Posting date in the document.

        PSTNG_DATE           TYPE /BI0/OIPSTNG_DATE,

*      InfoObject: 0TB_TCUR Transaction Currency.

        TB_TCUR           TYPE /BI0/OITB_TCUR,

*      InfoObject: 0FC_BETRH Amount in Local Currency with +/- Signs.

        FC_BETRH           TYPE /BI0/OIFC_BETRH,

*      InfoObject: 0FC_BETRW Amount in Transaction Currency with +/- Sig

*n.

        FC_BETRW           TYPE /BI0/OIFC_BETRW,

*      InfoObject: 0LOC_CURRCY Local currency.

        LOC_CURRCY           TYPE /BI0/OILOC_CURRCY,

*      InfoObject: 0CLEAR_DATE Clearing date.

        CLEAR_DATE           TYPE /BI0/OICLEAR_DATE,

*      InfoObject: 0FC_AUGBL Clearing Document.

        FC_AUGBL           TYPE /BI0/OIFC_AUGBL,

*      InfoObject: Z_CLEARR Clearing Reason (KF).

        /BIC/Z_CLEARR           TYPE /BIC/OIZ_CLEARR,

*      InfoObject: 0FC_CLEARR Clearing Reason.

        FC_CLEARR           TYPE /BI0/OIFC_CLEARR,

*      InfoObject: 0FC_AUGWA Clearing Currency.

        FC_AUGWA           TYPE /BI0/OIFC_AUGWA,

*      InfoObject: 0FC_AUGBT Clearing Amount in Clearing Currency.

        FC_AUGBT           TYPE /BI0/OIFC_AUGBT,

*      InfoObject: 0FC_AUGRS Clearing Restriction.

        FC_AUGRS           TYPE /BI0/OIFC_AUGRS,

*      InfoObject: 0FC_AUGVD Value Date of Clearing Posting.

        FC_AUGVD           TYPE /BI0/OIFC_AUGVD,

*      InfoObject: 0PCOMPANY Partner Company Number.

        PCOMPANY           TYPE /BI0/OIPCOMPANY,

*      InfoObject: 0FC_BLART Document Type.

        FC_BLART           TYPE /BI0/OIFC_BLART,

*      InfoObject: 0FC_SCTAX Tax Portion in Local Currency of FI-CA.

        FC_SCTAX           TYPE /BI0/OIFC_SCTAX,

*      InfoObject: 0FC_STTAX Tax Amount as Statistical Information in Do

*cument Currency.

        FC_STTAX           TYPE /BI0/OIFC_STTAX,

*      InfoObject: 0FC_SUBAP Subapplication in Contract Accounts Receiva

*ble and Payable.

        FC_SUBAP           TYPE /BI0/OIFC_SUBAP,

*      InfoObject: 0FC_ABGRD Write-Off Reason.

        FC_ABGRD           TYPE /BI0/OIFC_ABGRD,

*      InfoObject: 0FC_HERKF Origin Key of Document.

        FC_HERKF           TYPE /BI0/OIFC_HERKF,

*      InfoObject: 0FC_STORB Number of Reversal Document.

        FC_STORB           TYPE /BI0/OIFC_STORB,

*      InfoObject: ZBLTYP Bill Type.

        /BIC/ZBLTYP           TYPE /BIC/OIZBLTYP,

*      InfoObject: ZFC_AUGST Clearing Status.

        /BIC/ZFC_AUGST           TYPE /BIC/OIZFC_AUGST,

*      InfoObject: 0NETDUEDATE Due date for net payment.

        NETDUEDATE           TYPE /BI0/OINETDUEDATE,

*      InfoObject: 0FC_STUDT Deferral to.

        FC_STUDT           TYPE /BI0/OIFC_STUDT,

*      InfoObject: ZACCPTDT Acceptance Date.

        /BIC/ZACCPTDT           TYPE /BIC/OIZACCPTDT,

*      InfoObject: ZPLPSC Principal or LPSC Flag.

        /BIC/ZPLPSC           TYPE /BIC/OIZPLPSC,

*      InfoObject: ZFIACCGRP Account Group.

        /BIC/ZFIACCGRP           TYPE /BIC/OIZFIACCGRP,

*      InfoObject: Z_HERKF Z-Origin Key of Document.

        /BIC/Z_HERKF           TYPE /BIC/OIZ_HERKF,

*      InfoObject: Z_ERNAM Created By.

        /BIC/Z_ERNAM           TYPE /BIC/OIZ_ERNAM,

*      InfoObject: Z_CPUDT Day On Which Accounting Document Was Entered.

        /BIC/Z_CPUDT           TYPE /BIC/OIZ_CPUDT,

*      InfoObject: Z_CPUTM Time of Entry.

        /BIC/Z_CPUTM           TYPE /BIC/OIZ_CPUTM,

*      InfoObject: Z_HERKF2 Document Origin Key 2char.

        /BIC/Z_HERKF2           TYPE /BIC/OIZ_HERKF2,

*      InfoObject: Z_CPUDTK CPU Date K.

        /BIC/Z_CPUDTK           TYPE /BIC/OIZ_CPUDTK,

*      InfoObject: ZCPUDT Entered On.

        /BIC/ZCPUDT           TYPE /BIC/OIZCPUDT,

*      InfoObject: ZCPUDTK Entered On K.

        /BIC/ZCPUDTK           TYPE /BIC/OIZCPUDTK,

*      InfoObject: 0CALDAY Calendar day.

        CALDAY           TYPE /BI0/OICALDAY,

*      InfoObject: ZCLPSDK Clearing Posting Date (KF).

        /BIC/ZCLPSDK           TYPE /BIC/OIZCLPSDK,

*      InfoObject: ZCLPSDT Clearing Posting Date.

        /BIC/ZCLPSDT           TYPE /BIC/OIZCLPSDT,

*      InfoObject: ZMNTRANS Main Transaction.

        /BIC/ZMNTRANS           TYPE /BIC/OIZMNTRANS,

*      InfoObject: ZSUBTRANS Sub-Transaction.

        /BIC/ZSUBTRANS           TYPE /BIC/OIZSUBTRANS,

*      InfoObject: ZDUE_DTK FInal Due Date.

        /BIC/ZDUE_DTK           TYPE /BIC/OIZDUE_DTK,

*      InfoObject: ZDUE_DT Final Due Date.

        /BIC/ZDUE_DT           TYPE /BIC/OIZDUE_DT,

*      InfoObject: 0FCACTDETID Account Determination ID for Contract Acc

*ounts.

        FCACTDETID           TYPE /BI0/OIFCACTDETID,

*      InfoObject: ZINFOZ Doubtful Item Entry/Individual Value Adjustmen

*t.

        /BIC/ZINFOZ           TYPE /BIC/OIZINFOZ,

*      InfoObject: ZNTAF NTA Flag.

        /BIC/ZNTAF           TYPE /BIC/OIZNTAF,

*      Field: RECORD.

        RECORD           TYPE RSARECORD,

      END   OF _ty_s_SC_1.

    TYPES:

      _ty_t_SC_1        TYPE STANDARD TABLE OF _ty_s_SC_1

                        WITH NON-UNIQUE DEFAULT KEY.

*$*$ begin of global - insert your declaration only below this line  *-*

data : /BIC/AZCS_DNGD00,/BIC/AZFC_DS1000.

TYPES: BEGIN OF ts_dso2,

         /BIC/ZZDOC type  /BIC/OIZZDOC,

         /BIC/ZZAMT TYPE /BIC/OIZZAMT,

         /BIC/ZG_DATE TYPE /BIC/OIZG_DATE,

       END OF ts_dso2.

DATA: it_dso2 TYPE STANDARD TABLE OF ts_dso2,

       Wa_dso2 type ts_dso2.

*$*$ end of global - insert your declaration only before this line   *-*

    METHODS

      start_routine

        IMPORTING

          request                  type rsrequest

          datapackid               type rsdatapid

        EXPORTING

          monitor                  type rstr_ty_t_monitors

        CHANGING

          SOURCE_PACKAGE              type _ty_t_SC_1

        RAISING

          cx_rsrout_abort.

    METHODS

      inverse_start_routine

        IMPORTING

          i_th_fields_outbound         TYPE rstran_t_field_inv

          i_r_selset_outbound          TYPE REF TO cl_rsmds_set

          i_is_main_selection          TYPE rs_bool

          i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set

          i_r_universe_inbound         TYPE REF TO cl_rsmds_universe

        CHANGING

          c_th_fields_inbound          TYPE rstran_t_field_inv

          c_r_selset_inbound           TYPE REF TO cl_rsmds_set

          c_exact                      TYPE rs_bool.

ENDCLASS.                    "routine DEFINITION

*$*$ begin of 2nd part global - insert your code only below this line  *

... "insert your code here

*$*$ end of 2nd part global - insert your code only before this line   *

*---------------------------------------------------------------------*

*       CLASS routine IMPLEMENTATION

*---------------------------------------------------------------------*

*

*---------------------------------------------------------------------*

CLASS lcl_transform IMPLEMENTATION.

*----------------------------------------------------------------------*

*       Method start_routine

*----------------------------------------------------------------------*

*       Calculation of source package via start routine

*----------------------------------------------------------------------*

*   <-> source package

*----------------------------------------------------------------------*

  METHOD start_routine.

*=== Segments ===

    FIELD-SYMBOLS:

      <SOURCE_FIELDS>    TYPE _ty_s_SC_1.

    DATA:

      MONITOR_REC     TYPE rstmonitor.

*$*$ begin of routine - insert your code only below this line        *-*

  IF SOURCE_PACKAGE[] IS NOT INITIAL.

  SELECT /BIC/ZZAMT /BIC/ZG_DATE /BIC/ZZDOC

  FROM /BIC/AZCS_DNGD00 INTO TABLE it_dso2

  FOR ALL ENTRIES IN SOURCE_PACKAGE

  WHERE /BIC/ZZDOC =  SOURCE_PACKAGE-FC_OPBEL.

  ENDIF.

*--  fill table "MONITOR" with values of structure "MONITOR_REC"

*-   to make monitor entries

... "to cancel the update process

*    raise exception type CX_RSROUT_ABORT.

*$*$ end of routine - insert your code only before this line         *-*

  ENDMETHOD.                    "start_routine

*----------------------------------------------------------------------*

*       Method inverse_start_routine

*----------------------------------------------------------------------*

*

*       This subroutine needs to be implemented only for direct access

*       (for better performance) and for the Report/Report Interface

*       (drill through).

*       The inverse routine should transform a projection and

*       a selection for the target to a projection and a selection

*       for the source, respectively.

*       If the implementation remains empty all fields are filled and

*       all values are selected.

*

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

  METHOD inverse_start_routine.

*$*$ begin of inverse routine - insert your code only below this line*-*

... "insert your code here

*$*$ end of inverse routine - insert your code only before this line *-*

  ENDMETHOD.                    "inverse_start_routine

ENDCLASS.                    "routine IMPLEMENTATION

Former Member
0 Kudos

Can you please send me u r field routine code.

regards,

chakri.

Former Member
0 Kudos

HI,

As desired

READ TABLE IT_DSO2 INTO WA_DSO2 WITH KEY

          /BIC/ZZDOC = SOURCE_FIELDS-FC_OPBEL.

           IF SY-SUBRC = 0.

  RESULT = WA_DSO2-/BIC/ZZAMT.

rgds

Former Member
0 Kudos

Hello Experts,

Please can anyone help me here?

rgds

former_member210253
Contributor
0 Kudos

Hi imran,

/BIC/ZZDOC , FC_OPBEL these two are dates  right ?

And u dont having any syntax errors in start routine and field level routine ?

*$*$ begin of global - insert your declaration only below this line  *-*

data : /BIC/AZCS_DNGD00,/BIC/AZFC_DS1000.  -->>Remove this line.This line means your dsos are two variables then how it can fetch data from these variables.

regards,

babu.