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

logical database PTRVP

Former Member
0 Likes
795

hi All,

I want to change the selection screen for logical database PTRVP, is it possible to change it without changing the database selection program ?

I tried to look out for selection category for this LDB [ like HR LDBs] but dint find any.

can you please advise

thanks

1 ACCEPTED SOLUTION
Read only

gaursri
Active Contributor
0 Likes
662

Please check this link might be helpful to you:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm

Edited by: Gaurav Srivastava on Feb 4, 2009 11:52 AM

4 REPLIES 4
Read only

Former Member
0 Likes
662

this is a part of sap library.

abap progarmming -> logical database ->

The generated default selection include would look like this:

----


  • Include DBTEST_LDBSEL

  • It will be automatically included into the database program

----


  • If the source is automatically generated,

  • please perform the following steps:

  • 1. Replace ? by suitable names (at most 8 characters).

  • 2. Activate SELECT-OPTIONS and PARAMETERS (delete stars).

  • 3. Save source code.

  • 4. Edit database program.

*

  • Hint: Syntax-Check is not possible within this Include!

  • It will be checked during syntax-check of database program.

----


  • SELECT-OPTIONS : ? FOR LFA1-LIFNR.

  • Parameter for search pattern selection (Type SY-LDB_SP):

  • PARAMETERS p_sp AS SEARCH PATTERN FOR TABLE LFA1.

  • SELECT-OPTIONS :

  • ? FOR LFB1-LIFNR,

  • ? FOR LFB1-BUKRS.

  • SELECT-OPTIONS :

  • ? FOR LFC1-LIFNR,

  • ? FOR LFC1-BUKRS,

  • ? FOR LFC1-GJAHR.

  • SELECT-OPTIONS :

  • ? FOR BKPF-BUKRS,

  • ? FOR BKPF-BELNR,

  • ? FOR BKPF-GJAHR.

  • Enable DYNAMIC SELECTIONS for selected nodes :

  • Enable FIELD SELECTION for selected nodes :

If the nodes LFA1 and LFB1 are defined for dynamic selections, and node LFC1 is defined for field selections, the following lines of code will also be generated:

SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE LFA1.

SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE LFB1.

SELECTION-SCREEN FIELD SELECTION FOR TABLE LFC1.

The automatically-created selection include could be modified as follows:

  • Selection criteria:

SELECT-OPTIONS SLIFNR FOR LFA1-LIFNR.

SELECT-OPTIONS SBUKRS FOR LFB1-BUKRS.

SELECT-OPTIONS SGJAHR FOR LFC1-GJAHR.

SELECT-OPTIONS SBELNR FOR BKPF-BELNR.

  • Self-defined parameters:

PARAMETERS PSTIDA LIKE SY-DATUM FOR NODE BKPF.

  • Dynamic selections for LFA1 and LFB1:

SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODEE: LFA1, LFB1.

  • Field selection for LFB1 and LFC1:

SELECTION-SCREEN FIELD SELECTION FOR NODE: LFB1, LFC1.

Here, selections are chosen from the available selection criteria and are given names. An additional parameter PSTIDA is declared and linked to the node BKPF. Dynamic selections are defined for the tables LFA1 and LFB1. Field selections are defined for tables LFB1 and LFC1.

Edited by: Mohit Kumar on Feb 4, 2009 11:47 AM

Read only

gaursri
Active Contributor
0 Likes
663

Please check this link might be helpful to you:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm

Edited by: Gaurav Srivastava on Feb 4, 2009 11:52 AM

Read only

Former Member
0 Likes
662

thanks for your help so far, let me ask you a specific question.

If the structure of my ldb does not include a table T1, can i use one of the element from T1 in my selection screen as select-options ?

thanks

Read only

gaursri
Active Contributor
0 Likes
662

Hi Gautam ,

we can use such type of table in our select-options.Using the syntax

SELECT-optionS seltab FOR f.

This page from SAP library will provide you insight on the topic.

Link:[LDBTAB|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9f/dba71235c111d1829f0000e829fbfe/frameset.htm]

Hope your query resolves.

Have a best day ahead.

Edited by: Srivastava.G on Aug 7, 2009 1:03 PM