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

Header text field in SapScript

Former Member
0 Likes
7,336

Hi Experts,

I am now having a problem in my sapsript. In my main page where the "Header_Text" is located the result appears in the top of the page. And my concern is how to bring the result at the bottom of the page?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
6,526

Hi!

I solved my own problem. I created a new window and have this code "INCLUDE &T166K-TXNAM& OBJECT &T166K-TDOBJECT& ID &T166K-TDID&  LANGUAGE" will close the thread and assign points.

Thanks All.

27 REPLIES 27
Read only

Former Member
0 Likes
6,526

hi Neezaa

In se71, please select 'page and windows', then menu->settings->form painter

make the 'Graphical Form Painter' checked. A painter will appear, you can drag your

'Header_Text' to where you want.

regards,

Archer

Read only

0 Likes
6,526

Hi Zhang,

Yes I know that what I mean is the code in sapscript. The Header_Text belongs in main window. And my problem is I need to put the information of Header_Text at the bottom of the main window.

Read only

0 Likes
6,526


hi,

add some space line to buttom which adjust your height of the window, is this ok?

Archer

Read only

0 Likes
6,526

No it doesn't work

Read only

Former Member
0 Likes
6,526

Hi,

Try to display the header text using 'Include' statement.

Header texts will have the details such as 'Text name' 'Text ID' 'Text Object'.

On the main window check under which information you want to display and write this 'Include' statement just below in the text element.

Hope this makes sense.

Thanks!

Sandy

Read only

0 Likes
6,526

Hi Sandeep,

Can you elaborate? Sorry I'm new to abap and as a programmer as well. I know you will help me. Thankyou!!

Read only

0 Likes
6,526

Hi,

I will explain with an example. Please see below.

I have a PO and I am displaying the PO using ME23N, In the line items we will have a tab with name 'Texts' which displays all the item texts. If you click on that, double click on the text description it takes to the text editor screen. From there, place the cursor at the text and click on GOTO -> HEADER. It shows a screen with below details:

Text Name:

Language:

Text ID:

Text Object:

Now in the SAPScript, in the text element of main window write the below code:

INCLUDE 'Text Name' OBJECT 'Text Object' ID 'Text ID' LANGUAGE E.

The above code will display the header or item text depending upon the values you provide for Text name, object and ID.

Hope this helps.

Thanks!

Sandy.

Read only

0 Likes
6,526

This is already my codes

Read only

0 Likes
6,526

Hi,

Where do you want this text to be printed now?

Is it below Line item details?

Thanks!

Sandy

Read only

0 Likes
6,526

Hi Sandeep,

Here is the result in ME23N.I print screened the window of MAIN only. Now, on the remarks which is the TEXT in header should b place in the green area. How is it possible using the sapscript? Is it the position?

Read only

0 Likes
6,526

Hi,

Per your original question in the post, yes it is the position that has to be changed for the header text to be displayed.

See at which position in the main window you want to display and have the code in that text element accordingly.

Thanks!

Sandy

Read only

0 Likes
6,526

Hi,

The displays is ok. I want to change the position of header text field at the bottom of the page of main window.

Read only

0 Likes
6,526

Hi Sandy,

Can you give me the steps? Please! This is my last question then I'll close the thread.

Read only

0 Likes
6,526

Hi,

Seeing the screenshot, I believe you need the header text to be displayed below the line item details.

So,  after all the line items are printed, have the same Include code in the line item details text element.

Thanks!

Sandy

Read only

0 Likes
6,526

Hi,

Currently you have the 'Include' code under HEADER_TEXT text element.

Now, you need the same header text to be displayed in the green area (i.e. below line item details).

So, first see the text element which is printing the final message for line items (in the above screen '**item completely delivered***' is printed for item 0020.

Have the include code in that text element.

For quick understanding, first comment the Include code in HEADER_TEXT text element and put the same code in one of the text element that is printing the line items. You can see the difference. Best way is to debug and check where exactly you want the text to be printed.

Hope this helps.

Thanks!

Sandy.

Read only

0 Likes
6,526

Hi Sandy,

Everytime I put the header code anywhere in the sapscript, the result remain in that place (in the red box).

Read only

0 Likes
6,526

Are you active your sapscript after every time you changed?

Read only

0 Likes
6,526

Yes Zhang

Read only

Former Member
0 Likes
6,526

Hi,

Create a window of the size green highlighted that overlaps the MAIN window and place the text into that window.

Hope this helps.

Thanks,

Tooshar Bendale

Read only

0 Likes
6,526

Hi Tooshar,


Yes I made a new window but it doesn't appear in the invoice of ME23N.

Read only

0 Likes
6,526


Hi,

Is your testing client and the development client different ? If so then are you doing SCC1 and getting the latest version of the SAP Script as SAP scripts are client dependent.

Thanks,

Tooshar Bendale

Read only

0 Likes
6,526

Hi. No I have the same client

Read only

0 Likes
6,526

Hi,

Try hard coding some text in the newly created window and check if the hard coded text is visible in the output.

Thanks,

Tooshar Bendale

Read only

0 Likes
6,526

Hi Tooshar,


YES!!! Hard coded is visible.BIG HELP! so, what's the problem regarding to that?

Read only

0 Likes
6,526

Hi,

This means that variables are not having values in that particular window. Use the PERFORM statement to fetch data in SAP scripts

/:   PERFORM FETCHDATA IN PROGRAM ZPROGRAM.

/:   USING &PARAMETER1&

/:   CHANGING &PARAMETER2&

/:   ENDPERFORM

Hope this helps.

Thanks,

Tooshar Bendale

Read only

0 Likes
6,526

Hi! I don't understand as a first timer in ABAP. Do I need to merge the code in header text? What do you mean by parameter 1 and 2?

Read only

Former Member
0 Likes
6,527

Hi!

I solved my own problem. I created a new window and have this code "INCLUDE &T166K-TXNAM& OBJECT &T166K-TDOBJECT& ID &T166K-TDID&  LANGUAGE" will close the thread and assign points.

Thanks All.