cancel
Showing results for 
Search instead for 
Did you mean: 

recursive formatted search

Former Member
0 Kudos

Hi All,

This is the scenario. there are user defined fields created in item master(all for some item properties.). the same set of fields are defined in marketing document's detail. now I have defined formatted search on changing the last field of this set (in marketing docs' detail).when all the properties are selected, the itemcode will be fetched through this search. but by the default behavior of SAP , whenever item code is selected, entire row is refreshed. so all these properties' columns become blank once again. I have defined more formatted searches on these columns to again fetch the values from OITM whenever itemcode is selected. this works well. but the last field once again becomes blank because of the effect of first formatted search (original).

I hope I have explained it well.

hope someone would help.

regards,

Binita

Accepted Solutions (1)

Accepted Solutions (1)

former_member583013
Active Contributor
0 Kudos

Binita,

Whenever you change the ItemCode on the marketing document row, it will automatically refresh all the fields on that row. This cannot be controlled or changed.

If you give an example of what you are trying it would be more helpful than a descriptive question

Suda

Former Member
0 Kudos

Suda,

thanks for the reply.

I want do precisely this:

there are say two fields in marketing documents viz design and grade. whenever user selects a particular combination , item code will be fetched through formatted search. now with this, all columns again become blank. so I need to again pull the values in design and grade through formatted search from OITM corresponding to the item selected. design column gets filled. but since I have defined formatted search for itemcode whenever grade is changed, it again fires whenever grade is refilled with formatted search. and it remains blank.

I want a value there. and preferably without writing an addon for that.

hope it is comprehensible now.

regards,

Binita

former_member583013
Active Contributor
0 Kudos

Binita,

The basic design of your FMS seems incorrect. Are Design and Grade two UDF's on the row.

Please provide the FMS SQL code for me to review and suggest options

Suda

Former Member
0 Kudos

Suda,

Design and Grade are fields defined in marketing docs' detail.

1) This is the FMS defined for itemcode :


SELECT T0. itemcode from oitm T0 where T0.U_design = $[$38.U_design.0] and T0.U_grade = $[$38.U_grade.0]

with option 'refresh regularly' and given 'grade' as the column for option 'when exiting altered column'. it works as expected.

2) this is the FMS for 'Design' column :


SELECT T0.U_design from oitm T0 where T0.itemcode = $[$38.1.0]

with option 'refresh regularly' and given 'itemcode' as the column for option 'when exiting altered column'. it works as expected.

3) this is the FMS for 'Grade' Column :


SELECT T0.U_grade from oitm T0 where T0.itemcode = $[$38.1.0]

with option 'refresh regularly' and given 'itemcode' as the column for option 'when exiting altered column'.

this FMS again fires the first FMS since grade is refilled. and as a result, itemcode is again changed and grade becomes blank.

Now let me know if something is still missing in the question

regards,

Binita

former_member583013
Active Contributor
0 Kudos

Binita,

This is the change, I would like to propose...

Change the formatted search on the ItemCode to

SELECT T0. itemcode from oitm T0 where T0.U_design = '[%0\]' and T0.U_grade = '[%1\]'

Let the users press Shift+F2 on the ItemCode and select Design and Grade ..

Let the formatted searches on the Design and Grade be as they are

Suda

Answers (2)

Answers (2)

Former Member
0 Kudos

You have to decide which you should keep. One must be out if there no other logic to bring it in.

Thanks,

Gordon

Former Member
0 Kudos

The 1st and 2nd FMS are in circular references. It will be blank out. You have to change the query to make it work.

Thanks,

Gordon

Former Member
0 Kudos

Gordon,

I already know the cause. I want to know how should I write the query.

regards,

Binita