cancel
Showing results for 
Search instead for 
Did you mean: 

Archiving a confirmation using SARA?

Former Member
0 Kudos

Hi,

I need to apply a check on a confirmation that "A confirmation should be archived only if its PO is archived".

I have to apply this check while pre-processing BBP_CF object in SARA tcode. Where exactly can I write the coding for this check? Is there some user-exit or enhancement spot related to SARA?

Thanks In Advance,

Megha Gupta

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Megha ,

You can used Badi BBP_ARCHIVING_BADI to make condition based arhiveing .

use method CHECK_DOCUMENT_ARCHIVABLE to determine the document need to archived.

Thanks
Sharad

Former Member
0 Kudos

Hi Sharad,

Do I need to implement a new BADI? Will it stop here while pre-processing also? Where will I append the message in case the check fails?

Thanks,

Megha

Former Member
0 Kudos

Hi Megha,

The T code SARA work on 2 stem one is you write the document into Archive file and other than you delet the file from application.

same thing  you can do with the program

BBP_PD_ARCH_check

BBP_PD_ARCH_WRITE

before doing this you need to do required configuration and activation of achive setting in SPRO.

IMG: Supplier Relationship Management -> SRM Server -> Cross-Application Basic Settings -> Document Archiving -> ... or Supplier Relationship Management -> Supplier Self-Services -> Cross-Application Basic Settings -> Document Archiving ->

You can implement this Badi  and do test by program

BBP_PD_ARCH_check

I hope this will work to achive your required solution

Thank
sharad

Former Member
0 Kudos

Hi Sharad,

I have implemented the BADI BBP_ARCHIVING_BADI and written my check code in CHECK_DOCUMENT_ARCHIVABLE method.

I perform following steps on SARA:

1. give BBP_CF archiving object and click Pre-processing

2. time as immediate

3. select local printer settings

Now I click on execute button, but the execution is not getting stpped inside method CHECK_DOCUMENT_ARCHIVABLE.

Please suggest where am I going wrong?

Also, can you please tell me what didi you meant by "Test using program BBP_PD_ARCH_CHECK"? is that related to pre-proc? I put the debussger inside this program also, but the execution nevere stops here.

Thanks ,

Megha Gupta

Former Member
0 Kudos

Hello Megha,

please do check the program executions and do debugging .. the badi should triger. Debuger will not trigered in Background scheduled JOB. for SARA the job is schedued for archiving.

in program BBP_PD_ARCH_WRITE there is include BBP_PD_ARCH_WRITE_F02 where this badi is called.

   Intialialize BADI BBP_ARCHIVING_BADI
  IF sv_badi_arch IS INITIAL.
    CALL METHOD cl_exithandler=>get_instance
      EXPORTING
        exit_name              = 'BBP_ARCHIVING_BADI'       "#EC NEEDED
        null_instance_accepted = space
      IMPORTING
        act_imp_existing       = sv_arch_badi_active
      CHANGING
        instance               = sv_badi_arch.
  ENDIF.

ThankS

Sharad

Former Member
0 Kudos

Hi Sharad,

While debugging, I enter the ARCHIVE_SHEDULE_JOB function, in which, program BBP_PD_ARCH_CHECK is assigned while pre-processing. But I don't understand where exactly is this program called in mentioned function? Because I ahve tried putting break-point everywhere in the program but debugger never stops and comes out of execution of ARCHIVE_SHEDULE_JOB.

Can you please suggest something?

Thanks and Regards,

Megha Gupta

Former Member
0 Kudos

hi Mega ,

Please do check without scheduling job .. do execute from SE38 T code and check if this badi will get trigger. once you able to do test , than you can execute./schedule the same from SARA

Thanks

Sharad

Answers (0)