Application Development 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: 

How to do dynamic selection for fields

Former Member
0 Kudos

Hi,

Can you please help me on this.

I am adding the custom fields to the standard trasactions CJI3, CJI4, CJI5 for dispalying the line items. For this I am using COOMEP01 CO-OM: Information system -> line item reports enhancement.

I am displaying the custom fileds for line items.

The problem is...In all three t.codes I am having dynamic selection icon. user wants, selection is based on my custom fields...How to get my custom fileds on the selection screen?

Please assist me as soon.

Regards,

Ravi

5 REPLIES 5

Former Member
0 Kudos

HI

GOOD

Use this tip to make a dynamic table copy from a production system to a test system. The solution consists of two programs -- a function-module named z_bcsag_tablecopy_remote and a report named zbcsag_tablecopy. In the report you can specify the name of the table to be copied and the destination, which is used to get the connection to the productive system. In order to get it to work on your system, you first have to create the two programs in your test system.

-


Effect

This addition is allowed only for report-specific SELECT-OPTIONS which refer to a field f belonging to a table dbtab of the logical database. Here, the selections entered by the user are not passed directly to the logical database unless the logical database supports dynamic selections for dbtab (if dynamic selections for dbtab are not supported, the addition has no effect.

This addition can be useful if you only want the selections entered by the user for this SELECT-OPTION to be effective under certain conditions. However, you should be careful when using it: Since the selections have to be checked with CHECK after the records have been read, this has a considerable effect on performance.

Addition 14

... VALUE-REQUEST

Addition 15

... VALUE-REQUEST FOR LOW/HIGH

Effect

This addition is allowed only for database-specific SELECT-OPTIONS in the include program DBxyzSEL (where xyz = logical database name). It allows you to implement self-programmed value help. (To implement self-programmed value help for report-specific SELECT-OPTIONS , you can use the event key word AT SELECTION-SCREEN ON VALUE-REQUEST FOR ... .) If you specify only VALUE-REQUEST (without FOR ... ), the value help refers to both input/output fields of the SELECT-OPTION (i.e. to sel-LOW and sel-HIGH). Otherwise, it refers only to the specified field. The addition has two effects:

The affected input/output fields are displayed on the selection screen with the pushbutton for F4 (possible entries).

When the user presses this button or F4 , this triggers the FORM routine sel-LOW_VAL or sel-HIGH_VAL in the database access program SAPDBxyz (if it exists). If this addition is specified - and even if the SELECT-OPTION with FOR points to a Dictionary field - this FORM routine is executed when the user presses F4 and the check table or the fixed values of the Dictionary field are not displayed. You can, for example, branch from the routine sel-LOW_VAL or sel-HIGH_VAL to a function module which offers a selection list of possible values. At the end of this FORM routine, the contents of the field sel-LOW or sel-HIGH are copied to the appropriate input/output field.

Example

  • INCLUDE DBXYZSEL

...

SELECT-OPTIONS S_PTYPE FOR SAPLANE-PLANETYPE VALUE-REQUEST FOR LOW.

...

REPORT SAPDBXYZ DEFINING DATABASE XYZ.

...

TABLES SAPLANE.

...

FORM S_PTYPE-LOW_VAL.

...

CALL FUNCTION '...'.

...

ENDFORM.

Addition 16

... HELP-REQUEST

Addition 17

... HELP-REQUEST FOR LOW/HIGH

THANKS

MRUTYUN

Former Member
0 Kudos

Hai reddy

This example shows how different transactions codes can be used to produce different selection options for the same program. The example allows for lookups on Sales Order number, Purchase Order Number, Delivery Number or Invoice number.

*--- SELECTION OPTIONS -


SELECTION-SCREEN BEGIN OF BLOCK SO WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,"Sales order number

S_VBELND FOR LIKP-VBELN,"Delivery number

S_VBELNI FOR VBRK-VBELN,"Invoice number

S_VBELNP FOR VBKD-BSTKD."PO number

SELECTION-SCREEN END OF BLOCK SO.

*--- EVENT AT SCREEN OUTPUT -


AT SELECTION-SCREEN OUTPUT.

CASE SY-TCODE.

WHEN 'ZEDI6'.

LOOP AT SCREEN.

CASE SCREEN-GROUP4.

WHEN '001'. "Sales order select

SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '002'. "Delivery select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '003'. "Invoice select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '004'. "PO Select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

WHEN 'ZEDI6D'. "Delivery select

LOOP AT SCREEN.

CASE SCREEN-GROUP4.

WHEN '001'. "Sales order select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '002'. "Delivery select

SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '003'. "Invoice select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '004'. "PO Select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

WHEN 'ZEDI6I'. "Invoice select

LOOP AT SCREEN.

CASE SCREEN-GROUP4.

WHEN '001'. "Sales order select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '002'. "Delivery select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '003'. "Invoice select

SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '004'. "PO Select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

WHEN 'ZEDI6P'. "PO select

LOOP AT SCREEN.

CASE SCREEN-GROUP4.

WHEN '001'. "Sales order select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '002'. "Delivery select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '003'. "Invoice select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '004'. "PO Select

SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDCASE.

Thanks & regards

Sreenivasulu P

Former Member
0 Kudos

Are there any issues with modifying structure prps2_inc?

For example, I have created a Z* search help for

PRPS-USR00. I then add this seach help to prps2_inc. I am prompted to register the object. Any risks to this "core mod"?

Former Member
0 Kudos

Are there any issues with modifying structure prps2_inc?

For example, I have created a Z* search help for

PRPS-USR00. I then add this seach help to prps2_inc. I am prompted to register the object. Any risks to this "core mod"?

Former Member
0 Kudos

I want to build a actual line item report the look and feel of the report should be same as CJI3 but it should display the data from the ztables.

As CJi3 uses PSJ logical database. I need drilldown functionality as well not to material document but to finance documents.

Do I need to modify the existinng report if so what is best way to understand where make changes (I am new to FICO), or I need to create my own report program from 0.

do I need to copy and modify the PSJ logical database.

Any help will be greately appriciated