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.
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 :wink: ).
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 |