cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove the init form infopackages through a process chain or program

Former Member
0 Kudos

I have to do an init from time to time over several InfoPackages following the deletion of data. To do this:

- I run the transaction RSA1,

- I select the InfoPackage,

- I made ​​an init.

Would it be possible to remove the init process through a process chain or a program by defining only InfoPackages I want to reset?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can try the following FM for deletion of previous init.

RSS1_QUEUE_DELETED_IN_OLTP

Just create an ABAP program and then include that program in your process chain to automate this process.

Regards,

Durgesh.

Former Member
0 Kudos

Folow the helpul answer from Durgesh Gandewar, I found a program wich I would like to add to my process chain. But I am not really familiar with code abap.

How to add 10 ODS to this program that I want to delete init. All ODS are from the same system.

Here you are the programm found in this forum.

-


start code----


DATA: v_count TYPE i,

p_dsourc LIKE roosprmsc-oltpsource,

p_rlogsy LIKE roosprmsc-rlogsys.

p_dsourc = 'your source'. *"8E2_ODS1"

p_rlogsy = 'your system'. *"BP100"

SELECT COUNT(*) FROM rssdlinit INTO v_count

WHERE oltpsource = p_dsourc

AND logsys = p_rlogsy.

IF sy-subrc NE 0. "MesgTyp E end the program abnormally

MESSAGE e508(db6) WITH 'x' 'x' 'in DSource and/or LogSys'.

EXIT.

ENDIF.

  • Call delete function

CALL FUNCTION 'RSS1_QUEUE_DELETED_IN_OLTP'

EXPORTING

i_oltpsource = p_dsourc "OLTP-Source

i_logsys = p_rlogsy "LogSys (Myself or Remote)

EXCEPTIONS

failed = 1

OTHERS = 2.

IF sy-subrc 0.

MESSAGE e508(db6) WITH 'x' 'x' '===> No sucess <==='.

ENDIF.

---end code

former_member199691
Active Contributor
0 Kudos

You can create an internal table in your program which wil contain all the ODS you want to delte inti.

Then use a LOOP statement on this internal table and call that FM within the loop.

it should be something like this;

-


start code----


DATA: v_count TYPE i,

p_dsourc LIKE roosprmsc-oltpsource,

p_rlogsy LIKE roosprmsc-rlogsys.

DATA:Begin of i_target occurs 0,

dsource LIKE roosprmsc-oltpsource,

rlogsys LIKE roosprmsc-rlogsys,

end of i_target.

DATA:w_target type i_target.

*p_dsourc = 'your source'. *"8E2_ODS1"

*p_rlogsy = 'your system'. *"BP100"

wa_target-dsource = 'your source'. *"8E2_ODS1"

wa_target-rlossys = 'your system'. *"BP100"

Append wa_target to i_target.

  • repeat these 3 statements for all your data targets

Loop at i_target.

SELECT COUNT(*) FROM rssdlinit INTO v_count

WHERE oltpsource = i_target-dsource

AND logsys = i_target-rlogsys.

IF sy-subrc NE 0. "MesgTyp E end the program abnormally

MESSAGE e508(db6) WITH 'x' 'x' 'in DSource and/or LogSys'.

EXIT.

ENDIF.

  • Call delete function

CALL FUNCTION 'RSS1_QUEUE_DELETED_IN_OLTP'

EXPORTING

i_oltpsource = i_target-dsource

"OLTP-Source

i_logsys = i_target-rlogsys"LogSys (Myself or Remote)

EXCEPTIONS

failed = 1

OTHERS = 2.

IF sy-subrc 0.

MESSAGE e508(db6) WITH 'x' 'x' '===> No sucess <==='.

ENDIF.

ENDLOOP.

---end code

There might be some syntax erros but logic would remain same.

Regards,

Gaurav

Former Member
0 Kudos

Can you give me an example to create an internal table.

For example if I have 3 datasource for which I want to delete the init:

_oltsource_

0UC_SALES_01

0UC_PODINST_02

0UCINSTALLA_06

The logsys is the same for 3 oltsource.

Thanking you in advance for your help.

Santos

Answers (1)

Answers (1)

mr_v
Active Contributor
0 Kudos

U can add below program to process chain.

REPORT ZXXXX_INIT_DELETE.

Data: p_dsrce like ROOSPRMSC-OLTPSOURCE value 'Datasource name'.

Parameters: p_logsys like t000-logsys.

CALL FUNCTION 'RSS1_QUEUE_DELETED_IN_OLTP'

EXPORTING

I_OLTPSOURCE = p_dsrce

I_LOGSYS = p_logsys

EXCEPTIONS

FAILED = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

Former Member
0 Kudos

Hello,

You give me de ABAP code but I don't know to make a loop if we have several OltSource. For exemple What is the abap code for 3 oltsource like :

0UC_SALES_01

0UC_PODINST_02

0UCINSTALLA_06

Regards,

Santos