Dec 30, 2014

Sapscript/Smartforms Formatting options


&symbol(Z)& Omit Leading Zeros
&symbol(S)& Omit Leading Sign
&symbol(<)& Display Leading Sign to the Left
&symbol(>)& Display Leading Sign to the Right
&symbol(C)& Compress Spaces
&symbol(.N)& Display upto N decimal places
&symbol(T)& Omit thousands separator
&symbol(R)& Right justified
&symbol(I)& Suppress output of the initial value


Offset
Specifying an offset of N has the effect that the N left-most characters of the
symbol value will not be displayed. If the offset specified is greater than the
length of the value, nothing is output.
Syntax
&symbol+offset&
If symbol has the value 123456789, the following will be displayed:
&symbol& -> 123456789
&symbol+3& -> 456789
&symbol+7& -> 89
&symbol+12& ->
&symbol+0& -> 123456789


Output Length
If you require only a part of the symbol value, or the output has to fit into a box or
a field on the screen, without overlapping the edges of this area, then you can use
an output length specification to define how many character positions should be
copied from the value.
Syntax
&symbol(length)&
If symbol has the value 123456789.
&symbol(3)& -> 123
&symbol(7)& -> 1234567


Dec 15, 2014

Create Search Help in ABAP for Web Dynpro Component

This ABAP tutorial shows how to create search help and use it in Web Dynpro component for a context node attribute. First developers create Search Help in ABAP Data Dictionary using SE80 then assign Search Help to context node attribute using Input Help Mode and Dictionary Search Help properties in SAP Web Dynpro component.

This ABAP tutorial is formed of two sub-headings. First part in this tutorial shows how ABAP developers can create a search help in ABAP DATA Dictionary. The second section of the tutorial is dealing with how Web Dynpro developers can use this search help for a context node attribute.


Create Search Help in Data Dictionary

Call transaction SE80 Object Navigator. In Transport Organizer tab select Package from drop down list. Find your target package where you want to create your search help data dictionary object.


Right click on Dictionary Objects Context menu Create > Search Help


Type Search Help name. Leave Elementary search help as selected option.


Search Help create screen to define a new one


Type a short description. On Definition tab, type the master lookup table name at Selection method input textbox. Click on the first empty parameter line Search help parameter cell. Press F4 for possible entries or click on the F4 icon displayed when you click on the cell.


Double click on the field name you want to export to input text which is dislaying this search help. Mark the search help parameter as export.

Add all other desired fields but mark this time as import parameters

Enter the position number you want to see the field values in hit list using the LPos entery field. If you try to activate Search Help without hit list, you will get an error preventing the successfull activation of Search Help data dictionary object. Position in the hit list of an elementary search help Position of the parameter in the hit list.
Save and activate

Use Search Help in Web Dynpro Component for a Context Field

If you are going to use this Search Help on a Web Dynpro component, open component controller. Go to Context tab. Drill down the context node until you find the target field. Open properties of the attribute. There is a dropdown box at Input Help Mode property. You will see Dictionary Search Help. Change it from Automatic which is default to Dictionary Search Help.


Then enter the name of the Search Help data dictionary object which we have created in previous steps into the "Dictionary Search Help" property.


Save and activate your web dynpro component.
Here is the Search Help in action on a Web Dynpro web page.