cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax error in 0crm_c04

Former Member
0 Kudos

Hi expert,

When I add any fields in 0crm_c04 infocube . Syntax error is coming in transformation below this info-cube 0CRM_C04 .

Then It was found that due to structure  _ty_s_SC_1_full , it is showing problem .  Basically this structure should be same as  _ty_s_SC_1 in start routine.

When I try to make structure same as  _ty_s_SC_1 , change is not shown . 

Every time , Structure of  _ty_s_SC_1_full does not change and gives syntax error , since it is used in routine_9998.

Could you please help ?

Thanks & Regards

Devesh Babu

Accepted Solutions (0)

Answers (1)

Answers (1)

RamanKorrapati
Active Contributor
0 Kudos

Before adding field, you cube was active and daily data was feeding?

Can you try to do RSRV tests on your cube and later try to add required objects.

is your transformations to cube was active before? Seems like existing routines may have some syntax issues, please check on it if exist.

Even better to use remodeling concept to add objects to cube.

Former Member
0 Kudos

Hi Raman,

We are implementing CRM flow in BW system. Flow has been migrated but start routine still exist in 3.x format . 

ANd transformations was already active, we have just provided constant value to fiscal year variant and now start routine is giving problem.

While transporting transformation, It is showing syntax error . Otherwise It does not show problem while checking in dev system .

Thanks & Regards

Devesh babu

RamanKorrapati
Active Contributor
0 Kudos

Hi Devesh,

Try edit to your start routine and write in 7.x format.

in 7.x we need to use term as Source_package where in 3.x we used data_package.

Mean while lets share your code, you may get more inputs from forum.

Thanks

Former Member
0 Kudos

HI Raman ,

Below FM is giving problem .

CALL FUNCTION 'BW_CRM_DETERMINE_FISCVARNT'

    CHANGING

      SOURCE_PACKAGE       = SOURCE_PACKAGE[].

Code for FM:

FUNCTION BW_CRM_DETERMINE_FISCVARNT.

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  CHANGING

*"     REFERENCE(DATA_PACKAGE) TYPE  INDEX TABLE

*"  EXCEPTIONS

*"      PROBLEM_WITH_DATA_PACKAGE

*"----------------------------------------------------------------------

   DATA: LS_DATA_PACKAGE TYPE REF TO DATA.

   FIELD-SYMBOLS: <LS_DATA_PACKAGE> TYPE ANY.

   FIELD-SYMBOLS: <FISCVARNT>.

   FIELD-SYMBOLS: <CRM_SALORG>.

   DATA: CRM_SALORG TYPE STRING.

* for debugging with SM50

*  DATA: LV_ENDLESS.

*  WHILE LV_ENDLESS IS INITIAL.

*    LV_ENDLESS = LV_ENDLESS.

*  ENDWHILE.

* Fiscal Variant 'K4' may not exist, try your best to get a valid value

data: l_fiscvarnt  type PERIV.

data: l_fiscvarnt1 type PERIV.

data: l_fiscvarnt2 type PERIV.

select periv from T009 into l_fiscvarnt1.

   if l_fiscvarnt1 = 'K4'.

     l_fiscvarnt = 'K4'.

   endif.

   if l_fiscvarnt1(1) = 'K'.

     l_fiscvarnt2 = l_fiscvarnt1.

   endif.

endselect.

if l_fiscvarnt is initial.

   if l_fiscvarnt2 is initial.

     l_fiscvarnt = l_fiscvarnt1.

   else.

     l_fiscvarnt = l_fiscvarnt2.

   endif.

endif.

   IF GV_ERROR IS INITIAL.

     CALL FUNCTION 'BW_CRM_INIT_BWCRM'

          EXCEPTIONS

               ORGUNIT_TABLENAME     = 1

               CO_MST_AR_DOESNTEXIST = 2

               FISCVARNT_DOESNTEXIST = 3

               CO_MST_AR_TABLENAME   = 4

               OTHERS                = 5.

     IF SY-SUBRC <> 0.

       GV_ERROR = CV_INITIALISATION_FAILED.

     ELSE.

       GV_ERROR = CV_NONE.

     ENDIF.

* for better performance we like to do a binary search

     SORT GT_SALORG_FISCVARNT.

   ENDIF.

   IF GV_ERROR = CV_NONE.

     CREATE DATA LS_DATA_PACKAGE LIKE LINE OF DATA_PACKAGE.

     ASSIGN LS_DATA_PACKAGE->* TO <LS_DATA_PACKAGE>.

     ASSIGN COMPONENT 'CRM_SALORG' OF STRUCTURE <LS_DATA_PACKAGE> TO

                  <CRM_SALORG>.

     IF SY-SUBRC <> 0.

       RAISE PROBLEM_WITH_DATA_PACKAGE.

     ENDIF.

     ASSIGN COMPONENT 'FISCVARNT' OF STRUCTURE <LS_DATA_PACKAGE> TO

                 <FISCVARNT>.

     IF SY-SUBRC <> 0.

       RAISE PROBLEM_WITH_DATA_PACKAGE.

     ENDIF.

     LOOP AT DATA_PACKAGE INTO <LS_DATA_PACKAGE>.

       CRM_SALORG = <CRM_SALORG>.

       READ TABLE GT_SALORG_FISCVARNT

            WITH KEY SALORG = CRM_SALORG

            BINARY SEARCH.

       IF SY-SUBRC = 0.

         <FISCVARNT> = GT_SALORG_FISCVARNT-FISCVARNT.

       ELSE.

* CRM Standalone

         <FISCVARNT> = l_fiscvarnt.

       ENDIF.

       IF <FISCVARNT> IS INITIAL.

         <FISCVARNT> = l_fiscvarnt.

       ENDIF.

       MODIFY DATA_PACKAGE FROM <LS_DATA_PACKAGE>.

     ENDLOOP.

   ENDIF.




Could you please help me convert this code in 7.x format ?


Thanks & Regards

Devesh Babu

ENDFUNCTION.

RamanKorrapati
Active Contributor
0 Kudos

Hi,

Lets copy your existing code to note pad and save it.

Later at dev system, lets try to replace data_package with source-package.

save and activate it.

Lets try run your dtp once at dev system and check the data.

if its fine then move your changed code to qua/prod along with transformations.

please take abap expert help.

Thanks