Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Enhance the Master Data field in Datasource from standard source table

Former Member
0 Likes
742

Hi Friends Please help me to resolve this, would really be very kind of all of you.

Requirement. I want to Enhance the field ZFACTREG from VIBDBE table in my datasource 0busentity_attr extract structure l_s_REIS_BUSENTITY_ATTR, I want to create the logic in CMOD exit_saplrsap_002 to call my function module for enhancement of master data. Please help me Step by Step

Thanks

Poonam Roy

Step #1

I put this code which gives me error in CMOD like this

ERROR : Das formale Argument 'OTHERS' muss am Schluss der Ausnahmeliste stehen.

ABAP Code#1 IN exit_saplrsap_002

DATA: l_d_fmname(30) TYPE c.

CONCATENATE 'Z_DS_' i_datasource(25) INTO l_d_fmname.

TRY.

CALL FUNCTION l_d_fmname

EXPORTING

I_DATASOURCE = I_DATASOURCE

I_UPDMODE = I_UPDMODE

TABLES

I_T_SELECT = I_T_SELECT

I_T_FIELDS = I_T_FIELDS

I_T_DATA = I_T_DATA

C_T_MESSAGES = C_T_MESSAGES

EXCEPTIONS

RSAP_CUSTOMER_EXIT_ERROR = 1

OTHERS = 2

IF FOUND.

IF SY-SUBRC <> 0.

RASIE RSAP_CUSTOMER_EXIT_ERROR.

END IF

CATCH CX_SY_DYN_CALL_ILLEGAL_FUNC.

ENDTRY.

Step#2

I simple created the Function module Z_DS_BUSINESS

and put the code in source code which gives me error . what should i put in other tabs like"Import", Export", Tables" i kept blank

ABAP CODE give me error : The Dictionary structure or table "FIELD-SYMBOLS" is either not active. i have to remove include in the FM. WHY SO??

FUNCTION Z_DS_BUSINENSS

*"----


""Lokale Schnittstelle:

*" IMPORTING

*" VALUE(I_DATASOURCE) TYPE RSAOT_OLTPSOURCE

*" VALUE(I_CHABASNM) TYPE SBIWA_S_INTERFACE-CHABASNM

*" VALUE(I_UPDMODE) TYPE SBIWA_S_INTERFACE-UPDMODE

*" TABLES

*" I_T_SELECT TYPE SBIWA_T_SELECT

*" I_T_FIELDS TYPE SBIWA_T_FIELDS

*" I_T_DATA

*" C_T_MESSAGES STRUCTURE BALMI OPTIONAL

*" EXCEPTIONS

*" RSAP_CUSTOMER_EXIT_ERROR

*"----


INCLUDE ZXRSAU02.

WRITE: / 'INSIDE THE Z_DS_MEASUREMENTS PROGRAM'.

TABLES: REIS_BUSENTITY_ATTR,

VIBDBE,

field-symbols:.<fs_REIS_BUSENTITY_ATTR> like REIS_BUSENTITY_ATTR.

DATA: BEGIN OF i_c_t_data OCCURS 0.

include structure REIS_BUSENTITY_ATTR.

DATA END OF i_c_t_data.

DATA: i_c_t_data_copy like i_c_t_data OCCURS 0 WITH HEADER LINE,

begin of i_vibdbe occurs 0,

INTRENO like vibdbe-INTRENO,

ZFACTREG like vibdbe-ZFACTREG,

end of i_vibdbe.

i_c_t_data_copy[] = i_c_t_data[] = c_t_data[].

sort i_c_t_data_copy by vibdbe.

Select INTRENO

into table i_VIBDBE from VIBDBE

for all entries in i_c_t_data_copy

where INTRENO = i_c_t_data_copy- INTRENO.

if sy-subrc = 0.

sort i_VIBDBE by INTRENO.

loop at i_c_t_data assigning <fs_REIS_BUSENTITY_ATTR>.

clear: i_VIBDBE.

read table i_VIBDBE with key INTRENO = <fs_REIS_BUSENTITY_ATTR>-INTRENO

BINARY SEARCH

transporting ZFACTREG .

if sy-subrc = 0.

<fs_REIS_BUSENTITY_ATTR>-ZZFACTORY = i_vibebe-ZFACTREG

endif.

null

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
662

I don' t see the dot between the two lines

OTHERS = 2
IF FOUND.

Regards

Hi Friends Please help me to resolve this, would really be very kind of all of you.

Requirement. I want to Enhance the field ZFACTREG from VIBDBE table in my datasource 0busentity_attr extract structure l_s_REIS_BUSENTITY_ATTR, I want to create the logic in CMOD exit_saplrsap_002 to call my function module for enhancement of master data. Please help me Step by Step

Thanks

Poonam Roy

Step #1

I put this code which gives me error in CMOD like this

ERROR : Das formale Argument 'OTHERS' muss am Schluss der Ausnahmeliste stehen.

ABAP Code#1 IN exit_saplrsap_002

DATA: l_d_fmname(30) TYPE c.

CONCATENATE 'Z_DS_' i_datasource(25) INTO l_d_fmname.

TRY.

CALL FUNCTION l_d_fmname

EXPORTING

I_DATASOURCE = I_DATASOURCE

I_UPDMODE = I_UPDMODE

TABLES

I_T_SELECT = I_T_SELECT

I_T_FIELDS = I_T_FIELDS

I_T_DATA = I_T_DATA

C_T_MESSAGES = C_T_MESSAGES

EXCEPTIONS

RSAP_CUSTOMER_EXIT_ERROR = 1

OTHERS = 2

IF FOUND.

IF SY-SUBRC <> 0.

RASIE RSAP_CUSTOMER_EXIT_ERROR.

END IF

CATCH CX_SY_DYN_CALL_ILLEGAL_FUNC.

ENDTRY.

Step#2

I simple created the Function module Z_DS_BUSINESS

and put the code in source code which gives me error . what should i put in other tabs like"Import", Export", Tables" i kept blank

ABAP CODE give me error : The Dictionary structure or table "FIELD-SYMBOLS" is either not active. i have to remove include in the FM. WHY SO??

FUNCTION Z_DS_BUSINENSS

*"----


""Lokale Schnittstelle:

*" IMPORTING

*" VALUE(I_DATASOURCE) TYPE RSAOT_OLTPSOURCE

*" VALUE(I_CHABASNM) TYPE SBIWA_S_INTERFACE-CHABASNM

*" VALUE(I_UPDMODE) TYPE SBIWA_S_INTERFACE-UPDMODE

*" TABLES

*" I_T_SELECT TYPE SBIWA_T_SELECT

*" I_T_FIELDS TYPE SBIWA_T_FIELDS

*" I_T_DATA

*" C_T_MESSAGES STRUCTURE BALMI OPTIONAL

*" EXCEPTIONS

*" RSAP_CUSTOMER_EXIT_ERROR

*"----


INCLUDE ZXRSAU02.

WRITE: / 'INSIDE THE Z_DS_MEASUREMENTS PROGRAM'.

TABLES: REIS_BUSENTITY_ATTR,

VIBDBE,

field-symbols:.<fs_REIS_BUSENTITY_ATTR> like REIS_BUSENTITY_ATTR.

DATA: BEGIN OF i_c_t_data OCCURS 0.

include structure REIS_BUSENTITY_ATTR.

DATA END OF i_c_t_data.

DATA: i_c_t_data_copy like i_c_t_data OCCURS 0 WITH HEADER LINE,

begin of i_vibdbe occurs 0,

INTRENO like vibdbe-INTRENO,

ZFACTREG like vibdbe-ZFACTREG,

end of i_vibdbe.

i_c_t_data_copy[] = i_c_t_data[] = c_t_data[].

sort i_c_t_data_copy by vibdbe.

Select INTRENO

into table i_VIBDBE from VIBDBE

for all entries in i_c_t_data_copy

where INTRENO = i_c_t_data_copy- INTRENO.

if sy-subrc = 0.

sort i_VIBDBE by INTRENO.

loop at i_c_t_data assigning <fs_REIS_BUSENTITY_ATTR>.

clear: i_VIBDBE.

read table i_VIBDBE with key INTRENO = <fs_REIS_BUSENTITY_ATTR>-INTRENO

BINARY SEARCH

transporting ZFACTREG .

if sy-subrc = 0.

<fs_REIS_BUSENTITY_ATTR>-ZZFACTORY = i_vibebe-ZFACTREG

endif.

null

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
663

I don' t see the dot between the two lines

OTHERS = 2
IF FOUND.

Regards

Read only

0 Likes
662

thats good thought but that does not solve my issue code is not working