Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to edit Logical Database.

Former Member
0 Likes
2,982

Hi my requirement is to add a select option in screen but i got to know that the existing program is using a Logical Database.

So help me plss in editing the Database and creating my Select option.

The field is PRCTR which is already there but i have never worked on LDB's before so i have no clue how to proceed on this.

thanks

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
1,813

There is not need to copy a logical database. It is much simpler to just add PRCTR as another selection in your program and apply the selection criteria using CHECK after the respective GET statement.

Thomas

5 REPLIES 5
Read only

Former Member
0 Likes
1,813

use SLDB tcode, copy to logical database to custom logical database, you can modify custom logical database as per your requirement.

Read only

0 Likes
1,813

I tried copying the standard ADA logical database but it gives me an error stating "nothing was copied since the lock could not be removed"..

Please help

Read only

0 Likes
1,813

Hi Rajat,

I have observed that PRCTR(Profit center) field is not available in ADA LDB. I believe it is coming from the program to which ADA LDB is attached. So copy that program to Z and modify as per requirement if no enhancements are available for that program.

One more thing, I have copied ADA to ZADA without any issues. Pls remove the lock entries in transaction SM12 on this object and then give a try.

Hope this will helps you!

Shravan

Read only

ThomasZloch
Active Contributor
0 Likes
1,814

There is not need to copy a logical database. It is much simpler to just add PRCTR as another selection in your program and apply the selection criteria using CHECK after the respective GET statement.

Thomas

Read only

0 Likes
1,813

Hi Thomas,

Thanks for the idea, I've tried out you suggestion in a test program (code below) and I've found it works well.

I'm concerned that it may be slow if only the 'new' select-options are used i.e. no selections are made from the existing selection screen parameters. So I will add some default values, or a variant, that will limit the data returned in the 'get' for my production version.

 

Brian

report zbme_test.

* This report uses Logical database AFI

* If you forgot to add it when creating the program add it now via

* the menu Goto->Attributes-> add AFI in the Logical Database field

tables diaufk.

data: lt_diaufk type table of diaufk.

selection-screen begin of block b1 with frame title text-001.

select-options: s_aenam   for diaufk-aenam,

                s_mat     for diaufk-ilart.

selection-screen end of block b1.

  get diaufk.

*           remove any items that are not wanted

            check s_aenam.

            check s_mat.

  append diaufk to lt_diaufk.

  end-of-selection.

 

* display results in ALV

  call function 'REUSE_ALV_GRID_DISPLAY'

   exporting

     i_structure_name                  = 'DIAUFK'

    tables

      t_outtab                          =  lt_diaufk

* EXCEPTIONS

*   PROGRAM_ERROR                     = 1

*   OTHERS                            = 2

            .

  if sy-subrc <> 0.

*       Implement suitable error handling here

  endif.