Search This Blog

Wednesday, April 14, 2021

How to change released TR into Unreleased TR

 

How to change released TR into Unreleased TR




1. Go to SE38

2. execute the report RDDIT076




3. now, we will get the below screen which asks for TR/Tasks . give the released TR number and execute (F8)


4. Once executed, you will get the below window,


5. first we need to change the task to unreleased. double click on the task number. now, click on the pencil button to enter edit mode.then click on input help on the filed “Status”


6. change the status from “R” to “D” and save


7. now repeat the steps 5 and 6 for Transport request. finally the status column should be in “D” as shown in below.


8. now goto SE01 or SE09, type the TR number and check. it will be in modifiable state.

Friday, April 9, 2021

Using Collect and Append in SAP ABAP

 

Using Collect and Append in SAP ABAP





COLLECT : This keyword is used for summation purposes.. when you collect a record to an internal table, it will find that is the table already have any record with the same key values? If yes, then it will add all the numeric values of the new record to the existing record without changing the non numeric values. But, if there is no record with this key value, it will create a new record.

APPEND: This keyword will append the current contents of the table header or the structure to the end of the table as a new record.. This will not affect the any existing record of the table.

REPORT ZTEST.


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""  COLLECT STATEMENT
TYPESBEGIN OF TY_DATA"user defined type
       ID TYPE ,
       NAME TYPE CHAR20,
       SALARY TYPE I,
      END OF TY_DATA.
DATA ITAB TYPE TABLE OF TY_DATA"internal table
DATA WA TYPE TY_DATA"work area

WA-ID 1.
WA-NAME 'EMP1'.
WA-SALARY 5000.
COLLECT WA INTO ITAB"collect
CLEAR WA.

WA-ID 2.
WA-NAME 'EMP2'.
WA-SALARY 50000.
COLLECT WA INTO ITAB"collect
CLEAR WA.

WA-ID 1.
WA-NAME 'EMP1'.
WA-SALARY 15000.
COLLECT WA INTO ITAB"collect
CLEAR WA.

LOOP AT ITAB INTO WA.
  WRITE:/ WA-IDWA-NAMEWA-SALARY"loop and display data
ENDLOOP.



"""""""""""""""""""""""""""""""""""""""               APPEND STATEMENT

REPORT ZTEST.
TYPESBEGIN OF TY_DATA"user defined type
       ID TYPE ,
       NAME TYPE CHAR20,
       SALARY TYPE I,
      END OF TY_DATA.
DATA ITAB TYPE TABLE OF TY_DATA"internal table
DATA WA TYPE TY_DATA"work area

WA-ID 1.
WA-NAME 'Sapnuts'.
WA-SALARY 5000.
COLLECT WA INTO ITAB"collect
CLEAR WA.

WA-ID 2.
WA-NAME 'SAPabap'.
WA-SALARY 50000.
COLLECT WA INTO ITAB"collect
CLEAR WA.

WA-ID 1.
WA-NAME 'Sapnuts'.
WA-SALARY 15000.
COLLECT WA INTO ITAB"collect
CLEAR WA.

LOOP AT ITAB INTO WA.
  WRITE:/ WA-IDWA-NAMEWA-SALARY"loop and display data
ENDLOOP.



Thursday, April 8, 2021

How to use select option from table TVARVC

 

How to use select option from table TVARVC


Sample code below :


  TABLESVBRK TVARVC.
  DATALV_DATA   TYPE VBRK-FKART VALUE 'XYZ'.
  DATALR_DIR_RANGE TYPE RANGE OF CHAR50.
  SELECT SIGN
  OPTI
  LOW
  HIGH
  INTO TABLE LR_DIR_RANGE
  FROM TVARVC
  WHERE  NAME 'ZSD_BLOCK_BILLING'  AND TYPE 'S'.
  IF  LV_DATA IN LR_DIR_RANGE )  .
    MESSAGE:  'You are not authorized to create bills' TYPE 'I'.
  ELSE.
    WRITE'HI'.
  ENDIF.

Pages