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: 

Setting the value of dropdown according tio 1st dropdown values

Former Member
0 Kudos

Hi All,

I have a requiremnt.

My code is like this.

DATA: LV_GROUP TYPE QCODEGRP,

LV_CODE TYPE QCODE,

LV_GROUP_FIELDNAME(30) TYPE C,

LV_CODE_FIELDNAME(30) TYPE C.

  • § 4.The event DOUBLE_CLICK provides parameters for row and column

  • of the click. Use row parameter to select a line of the

  • corresponding internal table.

" break-point.

FIELD-SYMBOLS TYPE LVC_T_MODI.

DATA: LS_MODI TYPE LVC_S_MODI.

CASE E_FIELDNAME.

WHEN 'PART_CODE' OR 'PART_GROUP'.

PERFORM F4_GET_CATALOG_SELECTION USING TQ80-OTKAT

CHANGING LV_CODE

LV_GROUP.

LV_GROUP_FIELDNAME = 'PART_GROUP'.

LV_CODE_FIELDNAME = 'PART_CODE'.

WHEN 'JOB_CODE' OR 'JOB_GROUP'.

PERFORM F4_GET_CATALOG_SELECTION USING TQ80-FEKAT

CHANGING LV_CODE

LV_GROUP.

LV_GROUP_FIELDNAME = 'JOB_GROUP'.

LV_CODE_FIELDNAME = 'JOB_CODE'.

WHEN 'ACTIVITY_CODE' OR 'ACTIVITY_GROUP'.

PERFORM F4_GET_CATALOG_SELECTION USING TQ80-MFKAT

CHANGING LV_CODE

LV_GROUP.

LV_GROUP_FIELDNAME = 'ACTIVITY_GROUP'.

LV_CODE_FIELDNAME = 'ACTIVITY_CODE'.

WHEN OTHERS.

EXIT.

ENDCASE.

FORM F4_GET_CATALOG_SELECTION USING P_CATALOG

CHANGING P_CODE

P_GROUP.

DATA:

LV_CATALOG LIKE QKAT-KATALOGART,

LV_H_CODE LIKE VIQMFE-FECOD,

LV_PICK TYPE C,

LV_RETN TYPE C,

LV_DISP TYPE C,

W_NOTIF_CATALOG LIKE LINE OF G_NOTIF_CATALOG,

I_CODEGRP LIKE QPK1CODEGRP OCCURS 0 WITH HEADER LINE.

DATA: BEGIN OF I_QPK1CD OCCURS 10.

INCLUDE STRUCTURE QPK1CD.

DATA: END OF I_QPK1CD.

LV_CATALOG = P_CATALOG.

LV_H_CODE = '*'.

LV_PICK = 'X'.

LOOP AT G_NOTIF_CATALOG INTO W_NOTIF_CATALOG WHERE QKATART = LV_CATALOG.

MOVE W_NOTIF_CATALOG-QCODEGRP TO I_CODEGRP-CODEGRUPPE.

APPEND I_CODEGRP.

ENDLOOP.

CALL FUNCTION 'QPK1_GP_CODE_SELECTION'

EXPORTING

I_KATALOGART = LV_CATALOG

  • I_CODEGRUPPE = CDGRP

I_CODE = LV_H_CODE

I_SPRACHE = SY-LANGU

I_PICKUP_MODE = LV_PICK

I_DISPLAY_MODE = LV_DISP

I_RETURN_IF_ONE = LV_RETN

TABLES

T_QPK1CDTAB = I_QPK1CD

T_CODEGRPTAB = I_CODEGRP

EXCEPTIONS

NO_MATCH_IN_RANGE = 01

NO_USER_SELECTION = 02

NO_AUTHORIZATION = 03

NO_SELECTION_SPECIFIED = 04

OBJECT_LOCKED = 05

LOCK_ERROR = 06

OBJECT_MISSING = 07.

CHECK SY-SUBRC = 0.

READ TABLE I_QPK1CD INDEX 1.

P_CODE = I_QPK1CD-CODE.

P_GROUP = I_QPK1CD-CODEGRUPPE.

My requirement is that I want to set the values of job_group and activity_group equal to values of part group drop down. I want to just select the value of part_group from the f4 option and other values should auto populate with same values.

Please help.

Thanks in Advance,

Hariom.

1 REPLY 1

former_member1245113
Active Contributor
0 Kudos

Hi Hari,

Check the below thread

Cheerz

Ram