Quantcast
Channel: SCN : Discussion List - SAP Planning and Consolidation, version for SAP NetWeaver
Viewing all articles
Browse latest Browse all 5414

Issue With Position Retraction to ECC

$
0
0

Dear Experts,

 

I am working on Position Retraction from BPC10 to Ecc System.

 

In BADI , after retraction process i m doing some process and updating the Mater data

 

In BPC7.5 we had a function module to process and update the master data

 

Function module name  =    UJA_API_PROCESS_DIMENSION

 

where as it has been obsolute in BPC10 version. for that i have enhanced my code as below but stil its not updating the master data

    CREATE OBJECT lo_member_mgr TYPE cl_ujam_member
    EXPORTING
      i_appset_id    = lv_env
      i_dimension_id = l_dim_name.

  try.
      lo_member_mgr->save(
        EXPORTING
          ir_members  = lr_members    " List of members to save
        IMPORTING
          et_errors   = lt_errors
      ).
      ls_message-message = 'Info: Successfully saved new member.'.
      append ls_message to et_message.
    catch cx_uj_static_check.
      loop at lt_errors into ls_errors.
        concatenate 'Error: Encounterend an error saving member ' ls_errors-member_id into ls_message-message.
        append ls_message to et_message.
      endloop.
      RAISE EXCEPTION type cx_uj_custom_logic.
  endtry.
try.
        l_appset    = i_appset_id.
        l_dimname   = l_dim_name.
        ls_dim_list = l_dimname.
        append ls_dim_list to lt_dim_list.

        DATA : l_finished  TYPE BOOLEAN,
               l_counter   type int4,
               lt_job_info type ujxa_t_job_info,
               ls_tmp_job_info type ujxa_s_job_info,
               l_length      type i,

               ls_job_messages type ujxa_s_job_info_message,
               ES_JOB_INFO Type  UJXA_S_JOB_INFO.

       try.
            l_finished = ''.
            CALL METHOD me->PROCESS_DIMENSION
              EXPORTING
                P_DIMENSION = l_dimname
                P_APPSET_ID = l_appset
              IMPORTING
                ES_JOB_INFO = ES_JOB_INFO
              CHANGING
                ET_MESSAGE  = Et_message.
            l_counter = 0.
            while l_counter lt 100.
              wait up to 5 seconds.

              me->get_job_log( exporting is_job = ES_job_info
                                importing et_jobinfos = lt_job_info ).
              loop at lt_job_info into ls_tmp_job_info.
                " ignore unstarted jobs
                l_length = lines( ls_tmp_job_info-messages ).
                if l_length gt 0.
                  if ls_tmp_job_info-error eq 'X'.
                    ls_message-msgty = 'E'.
                    ls_message-message = 'Error: Encounterend an error processing dimension.  See details below:'.
                    append ls_message to et_message.
                    loop at ls_tmp_job_info-messages into ls_job_messages.
                      ls_message-msgty = ls_job_messages-msgtype.
                      ls_message-message = ls_job_messages-message.
                      append ls_message to et_message.
                    endloop.
                    RAISE EXCEPTION type cx_uj_custom_logic.
                  elseif ls_tmp_job_info-is_running ne 'X'.
                    ls_message-msgty = 'I'.
                    ls_message-message = 'Info: Successfully processed the dimension'.
                    append ls_message to et_message.
                    l_finished = 'X'.
                  endif.
                endif.
              endloop.

              if l_finished eq 'X'. exit. endif.

              clear lt_job_info.
              l_counter = l_counter + 1.
            endwhile.
          catch cx_uj_static_check.
            RAISE EXCEPTION type cx_uj_custom_logic.
        endtry.

        commit work.
      catch cx_root.
    endtry.
  ENDIF.

 

please advise

 

Regards,

Suraj


Viewing all articles
Browse latest Browse all 5414

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>