SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Elementary search help



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Search Help, Match Code
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Sun Oct 14, 2007 7:13 pm    Post subject: Elementary search help Reply with quote


IMP Indicates whether value is imported from selection screen into search help.

EXP Indicates whether value is exported back to selection screen.

LPos Position of field in search help results report/table.

SPos Position of field in search help restriction screen.

SDis If this flag is set, the search help parameter appears in the popup window for restricting values as a display only field.

Modified (M…) This flag shows if the data element of the parameter is linked to the data element of the field of the selection method having the same name.

Default value Set default value for search help parameter.

Search help exit - Allows modification of search help functionality (i.e. populating result fields)

The search help exit allows you to modify functionality of search help. If you add a new field to the
parameter list that is not contained on the selection method you can manually populate it within the search
help exit.

This would be performed within the ‘STEP DISP’ section. Once within this section all search help data has been retrieved and is stored in table RECORD_TAB (record_tab-string) as one long string value.
Therefore you need to read table SHLP in-order to locate position of value within string.

To find position of personnel number (PERNR) within elemenory search
help M_PREMN you would use the following code:
Code:

Loop at record_tab.
   read table shlp-fielddescr into wa_shlp
                                   with key tabname   = 'M_PREMN'
                                            fieldname = 'PERNR'.


You could then use this information in the following way, for
example, to find a persons organisation unit:

Code:

    select  orgeh endda
        up to 1 rows
        from pa0001
        into (ld_orgeh,ld_endda)
       where pernr eq record_tab-string+wa_shlp-offset(8)
                                                  “pernr length is 8
       order by endda descending.
      endselect.

      select single orgtx
        from t527x
        into ld_orgtxt
       where orgeh eq ld_orgeh and
             sprsl eq sy-langu and
           ( endda ge sy-datum and
             begda le sy-datum ).


If you have added a new field to the end of the parameters list
the next step is to populate it by adding this data to the end of
the record_tab string:

  concatenate record_tab-string ld_orgtxt into record_tab-string.
  modify record_tab.
endloop.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Search Help, Match Code All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.