on 07-29-2011 2:24 PM
Hi,
I am just a beginner in smartform. I want to have the item text of a PO (ME21N) to be printed in the form. What I did, is I created a cell of a table, the cell contains a text and I used these parameters for the text:
Type: Include Text
Start: new Line
Text name : I keyed a name
Text Object: EKPO
Text ID: F01
No error if no text exists: ticked
But the text is not printed. Please enlighten me?
Thanks
thanks for your help . I greatly aprreciate it.
I am reading some document about smart form.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this.
Declare in our global definitions as
ID type THEAD-TDID value 'BEST'
OBJ TYPE THEAD-TDOBJECT value 'MATERIAL'
LANG type THEAD-TDSPRAS value 'EN'
V_SPEC TYPE STANDARD TABLE OF TLINE
V_TDNAME will be your line item material Number.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = id
LANGUAGE = lang
NAME = V_TDNAME
OBJECT = obj
TABLES
LINES = V_SPEC
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi HTO,
Just take it with ease.. Not to worry.. Hope you have taken inputs from Clemens Reply.
I hope you are using Table ( Header, Main Area, Footer ) to print data for your smartform.
Going ahead.. In my sample code
wa_itpotab is the work area which I am using in LOOP loop of table under Data section.
where you have this option:
Internal table <your internal table name> I INTO < work area concenrned to internal table >.
I had given like:
Internal table it_potab I INTO wa_itpotab.
So use your internal table and work area replace them in my sample code.
and one more thing dont forget to select EBELP component of EKPO.
Regards,
Dep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Include the below code in a line above the text using Program lines
concatenate wa_itpotab-ebeln wa_itpotab-ebelp
into v_text1.
Regards,
Dep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to declare V_TEXT1 in Global data of:
Global Settings > Global Definitions > Global Data
Variable Name : V_TEXT1
Type Assignment : TYPE
Associated Type : TEXT
while you are inserting below code Using Program Lines :
concatenate wa_itpotab-ebeln wa_itpotab-ebelp
into v_text1.
Check List:
1.You have to give this V_TEXT1 as Output Parameters of your Code Node ( Program Lines ).
2. wa_itpotab-ebeln wa_itpotab-ebelp as Input Parameters of your Code Node ( Program Lines ).
After this just save and activate.
Regards,
Dep
HTO,
take a day off and study the link: [SAP Smart Forms (BC-SRV-SCR)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf].
To print a form, you need a program for data retrieval and a Smart Form that contains the entire
from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if
changes to the form logic are necessary. The application program passes the data via a function
module interface to the Smart Form. When activating the Smart Form, the system automatically
generates a function module. At runtime, the system processes this function module.
Defining the Form Interface
Use
You define the form interface to pass data to the form.
In the interface you can define import and export parameters, tables, and exceptions.
Prerequisites
The data retrieval program provides the data you want to include into the form. Therefore, you
know the types of the corresponding variables.
Global Definitions
Use
Global definitions apply for the entire form. You can use any objects defined there in all nodes of
the tree.
Features
The following global definitions are possible:
Variables or constants whose types are stored in the ABAP Dictionary
All this you will find in the pdf. No need to read all 110 pages if you understand a few.
Regards
Clemens
BTW: New to Smartforms? New to ABAP? New to SAP? New to - you name it -?
Hi,
First concantenate ekpo-ebeln and ekpo-ebelp and move it a variable and then give that variable as Text Name .
Refer Below Sample code:
concatenate wa_itpotab-ebeln wa_itpotab-ebelp
into v_text1.
So Text Name : &v_text1&
and rest same as you mentioned:
Text Object: EKPO
Text ID: F01
No error if no text exists: ticked
Regards,
Dep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check your TEXTNAME. It should be your PO number.
Jshree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi HTO,
smartformstrace will inform you - probably the text was not found due to any error right between keyboard and back of the seat.
Regards
Clemens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you go to the PO and look at the Item texts. place the cursor in the text window and hit the display icon or double click. Go->header. You should be able to figure out the text name(Combination of PO and POitem).
Thanks,
Vamshi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The textname should be the combination of PO name and item name. Please find the below link to know more about READ_TEXT
function module.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the name you passed as text name?
Also try using READ_TEXT FM to read the item text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.