Scenerio :

When you are working with multilingual client. It is quite obvious that some key user create workbooks and maintain titles only in their log on language.

As we monitor the broadcast queue (RSPRECALCADMIN), we find such entries without titles.

PSA - BE.jpg

It is tough sometimes to catch each workbook created and maintain title in the required languege.

Please do not get confused with the translation here. It is just maintaining the same title in another languege. ( It is better to have something than nothing 😉 ).

Background information :

RSRWBINDEXT – Titles of binary objects (Excel workbooks) in InfoCatalog

The above table will be updated with title for required languege.

Program code :


*&---------------------------------------------------------------------*
*& Report  ZBW_WB_DESC_EN_DE
*&
*&---------------------------------------------------------------------*
*&The table RSRWBINDEXT contains the titles of the workbooks created
*&trhough BEx, the program checks the single entries in the said table
*&and maintains the same title in EN or DE vice versa.
*&---------------------------------------------------------------------*
REPORT  ZBW_WB_DESC_EN_DE MESSAGE-ID Zm.
Data :     ZRSRWBINDEXT type TABLE OF RSRWBINDEXT WITH HEADER LINE,
              ZRSRWBINDEXTT type TABLE OF RSRWBINDEXT WITH HEADER LINE,
              ZRSRWBINDEXT1 type TABLE OF RSRWBINDEXT WITH HEADER LINE,
             itab type table of istr WITH HEADER LINE.
types:  BEGIN OF istr,
           WORKBOOKID TYPE RSRWBINDEXT-WORKBOOKID,
           CNT type i,
           END OF istr.
SELECT * FROM RSRWBINDEXT INTO TABLE ZRSRWBINDEXT WHERE OBJVERS = 'A'.
SORT ZRSRWBINDEXT ASCENDING BY WORKBOOKID.
LOOP AT ZRSRWBINDEXT.
     READ TABLE ITAB WITH TABLE KEY WORKBOOKID =  ZRSRWBINDEXT-WORKBOOKID.
     IF SY-SUBRC = 0.
            ITAB-CNT = ITAB-CNT + 1.
            modify itab TRANSPORTING CNT where WORKBOOKID = ZRSRWBINDEXT-WORKBOOKID.
     ELSE.
            ITAB-WORKBOOKID = ZRSRWBINDEXT-WORKBOOKID.
            ITAB-CNT = 1.
            INSERT TABLE ITAB.
      ENDIF.
ENDLOOP.
LOOP AT ITAB WHERE CNT = 1.
     READ TABLE ZRSRWBINDEXT WITH KEY WORKBOOKID =  ITAB-WORKBOOKID.
     INSERT ZRSRWBINDEXT INTO TABLE ZRSRWBINDEXT1.\
ENDLOOP.
LOOP AT ZRSRWBINDEXT1.
     IF ZRSRWBINDEXT1-LANGU = 'E'.
          ZRSRWBINDEXT1-LANGU = 'D'.
          INSERT ZRSRWBINDEXT1 INTO TABLE ZRSRWBINDEXTT.
     ELSEIF ZRSRWBINDEXT1-LANGU = 'D'.
         ZRSRWBINDEXT1-LANGU = 'E'.
         INSERT ZRSRWBINDEXT1 INTO TABLE ZRSRWBINDEXTT.
     ELSE.
         ZRSRWBINDEXT1-LANGU = 'D'.
         INSERT ZRSRWBINDEXT1 INTO TABLE ZRSRWBINDEXTT.
         ZRSRWBINDEXT1-LANGU = 'E'.
         INSERT ZRSRWBINDEXT1 INTO TABLE ZRSRWBINDEXTT.
      ENDIF.
ENDLOOP.
MODIFY RSRWBINDEXT from TABLE ZRSRWBINDEXTT.
MESSAGE S000 with sy-dbcnt.

As I am not an expert in ABAP, you may find the coding as novice.

Hope it helps, do share your suggestions and thoughts about it.

To report this post you need to login first.

20 Comments

You must be Logged on to comment or reply to a post.

    1. Limbadri Sabbani Post author

      Hello Anshu,

      As it is my first blog, I am bit excited to see the response.

      Its great see appreciation from “Topic Leaders” (Anshu & Suman)

      Thanks,

      LS

      (0) 
  1. Vinay D

    Hi Badri,

    Good to see that you have started off with your first blog 😉 .

    Much appreciated!.

    Well the idea of maintaining some text instead of leaving it blank(with weird tech. name) is a good way.

    Thanks for useful info.

    Regards,

    Vinay.

    (0) 
    1. Limbadri Sabbani Post author

      Hello Vinay,

      Thanks for your comments 🙂

      It is better to have something than nothing

      Hope you have noticed, the line is from our TL (JK). And it was a trigger 😉

      (0) 

Leave a Reply