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

search help

suganya_rangarajan
Participant
0 Likes
479

Hi,

I need to create a search help for a field say plan_name available in table 'tab1'. Tab1 also has

fields begin_date and end_ date.Plan_name has a check table 'chktab' with fields begin_date,end_date,

plan_name and text. Now when i give f4 for plan_name i shoud get the list of plan_names from the 'chktab' within the date of tab1-begin_date and tab1-end_date. Can anyone tell me how do i achieve this.

Thanks

Suganya

4 REPLIES 4
Read only

Former Member
0 Likes
420

Hi ... your question is not clear ...

on F4 help .. you want plan_name from Check table and b_date and end_date form TAB1.

What if there is plan_name in check table and no coreesponding entry in TAB1 ??

Thanks,

Aditya. V

Read only

suganya_rangarajan
Participant
0 Likes
420

On f4,I want to list all the plan_names,begin_date & end_date from the check table that lies within the date range of tab1-begin_date and tab1-end_date.

Basically i want to compare as

if chktab-begin_date >= tab1-begin_date and chktab-end_date <= tab1-end_date.

should be output in the list.

else.

not in output.

endif.

Thanks

Suganya

Read only

Former Member
0 Likes
420

In case you should create custom seach help with the search help exit;

And in the Serach help exit FM with changing parametres;

SHLP TYPE SHLP_DESCR_T

CALLCONTROL LIKE DDSHF4CTRL

And tables;

SHLP_TAB TYPE SHLP_DESCR_TAB_T

RECORD_TAB LIKE SEAHLPRES

.. follow the code template; .. here you shouild write your logic in 'SELECT' case and populate the ''F4UT_RESULTS_MAP' exp / tables ...

ata: ws_txjcd like bseg-txjcd,

i_txjcd like ztxjcd occurs 0 with header line.

REFRESH: I_TXJCD.

case CALLCONTROL-STEP.

when 'SELECT'.

CALL FUNCTION 'F_VALUES_TXJCD'

EXPORTING

I_BUKRS = '1100'

I_LAND1 = 'US'

IMPORTING

E_TXJCD = ws_txjcd

EXCEPTIONS

ABNORMAL_TERMINATION = 1

PARAMETER_CONFLICT = 2

NOTHING_FOUND = 3

OTHERS = 4

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

  • i_txjcd-bukrs = '1100'.

  • i_txjcd-land1 = 'US'.

  • i_txjcd-regio = 'PA'.

i_txjcd-txjcd = ws_txjcd.

append i_txjcd.

CALL FUNCTION 'F4UT_RESULTS_MAP'

EXPORTING

source_structure = 'ZTXJCD'

apply_restrictions = ' '

TABLES

shlp_tab = shlp_tab

record_tab = record_tab

source_tab = i_txjcd

CHANGING

shlp = shlp

callcontrol = callcontrol

EXCEPTIONS

OTHERS = 0.

callcontrol-step = 'RETURN'.

EXIT.

endcase.

$$----


$$ STEP RETURN (Return values)

$$----


IF callcontrol-step = 'RETURN'.

EXIT.

ENDIF.

Read only

Former Member
0 Likes
420

Hope you undersatnd what to do ?

Thanks,

Aditya. V