Skip to Content

1) Create a ZProgram through transaction SE38 as per the following screen-shots:–>

     P1.png

2) Attribute of Main Program :

     P2.png

3) Create a new Custom table ZU001 with contains hardcode values to call dynamic hardcode value for the program:

    P20.png

4) Created a Table Maintenance Generator for this table as shown below:

     P21.png

5) Create a new entry in the hardcodes table (ZU001) for the program:

    

Program Name

Data  Type

Level

Secuence

Value (Low)

Action Type

Description

ZYQUERY_DELETE

RP

2

1

180

1

Y QUERIES

6) Then Perform the Logic part to delete Y Queries as follows:

     P3.png
    Inside FORM Get_Days , Calling custom Function Module “Z_GET_HARDCODES”.

  

P4.png

5) Create a Custom Function Module “Z_GET_HARDCODES” to get all hardcode values :

(a)    Create a Function Group from Tcode SE80:–>

        P7.png

  (b)    Function Module Attributes:–>

       P5.png

  (c) Import Parameters :–>

       P6.png

(d) Tables Parameter:–>

            P8.png

(e) Source Code :–>

                P9.png                      

                P10.png

                  P11.png

6)Come back to original Program:

                  Calculate the date from no. of days received from Function Module:

                  P12.png

                     P13.png

             Concatenate Y* into variable lv_Search. Then do perform Batch data recording through TCode SHDB.

                        P14.png

                          P15.png

                             P16.png

   7) Testing of this program :–>

      Y Queries:

      Carried out the test for Y Queries deletion. Before that just check the entry of Y Queries in Table RSZCOMPDIR. And identified all the queries older than

      180 days (5 entries).

        P17.png

          Then finally executed program ZYQUERY_DELETE and see the results as follows:

          We can see from the below screenshot that the 5 entries were deleted. (118 -113 = 5).

          /wp-content/uploads/2013/12/p18_341866.png

          P19.png        

To report this post you need to login first.

4 Comments

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

Leave a Reply