SAP-SCRIPT - select data in the form
Hi expert,
In the existing form there's a field with user-name of document's creator.
I have to make a modify:
Put the first name and last name of document's creator instead user name.
How can I make this modify ... I have to modify the print report or I can modify only the form ?
How ?
tks a lot...
bye.
First you have to check whether this data is already available in the form or not?
If available, then just modify the form and replace the user name with First & Last name.
If not available then you have to use a subroutine to get the name from username. Make the call from script and write the subroutine in the print program.
To check more about subroutine in SAPScript search forum, you will get many replies.
Similar Messages
-
How to insert the style in sap-script? and in smart form?
how to insert the style in sap-script? and in smart form?
Hi..,
For SAP scripts u need to create them in SE72 ...
and u can include them in the script editor as..
/: STYLE <STYLE-NAME>
P1 text............... (*** P1 is the Paragraph format created in SE72 )
/: STYLE *
For smartforms u need to go for the transaction (tcode) SMARTSTYLES... here u can create paragraph and character formats globally...
<b>Sunil, plz do remember to close all your threads, when ur problem is solved !!</b>
reward all helpful answers,
sai ramesh -
In sap scripts how to display the driver program
Hi,
I Want to know the sap scripts How to display the output to driver programHi,
Go to NACE Transaction.
Select application for ex: if sales V1.
Click on output types.
Select the output type for ex : BA00
Double click on Processing routines.
There you can find the Driver Program name and Script/smart form name.
Reward if useful.
Thanks,
Raju -
How to print the data on the form (smartform)...
Hi,
i got a requirement that i have to create a selection screen and from that i process the data according to the inputs in the selection screen, and after i collect the entire data in an internal table, now i want that data to be displayed in the form ,
what is the process for this, can anybody explain me in detail.
Regards,
RamHi!
To create new smartform
How to create a New smartfrom, it is having step by step procedure
http://sap.niraj.tripod.com/id67.html
Here is the procedure
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
for Smartforms material
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Or an another one:
just check it step by step with lots of screen shots.
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Reward all helpfull answers
Regards
Tamá -
How to execute the data in the form when the data is already avaliable
Hi,
I am working with forms 6i. I have a problem while executing the data in the form
Actually, the data is already present in the form. But when i run the form, the data is not displayed.
can anyone please help me how to execute the data. below is the code
Set_Alert_Property(alert_id,ALERT_MESSAGE_TEXT,'Do you want to refresh new Data for that Year and Field ? (it will take a time).') ;
SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON1, LABEL, 'Yes');
SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON2, LABEL, 'No');
SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON3, LABEL, 'Cancel');
button_number :=Show_Alert(alert_id) ;
synchronize;
if button_number != ALERT_BUTTON3 then
if button_number = ALERT_BUTTON1 then
:param.field := :control.f_cd;
:param.year := :control.year;
build_tables;
fields;
-- areas(:param.field);
PUT_PARAM;
COMMIT_FORM;
go_block('wet_criterias');
end if;
if button_number = ALERT_BUTTON2 then
:exhibits.field_display := :control.f_name || ' - Exhibits';
go_block('RESERVOIR');
execute_query;
end if;
end if;
end if;
else
message('Fields must be entered...');
end if;
else
message('Fields must be entered...');
end if;It's hard to know what logic you are trying to implement.
However, by looking at your code, it seems that if the user select 'Yes' to the question "Do you want to refresh", nothing is done except the go_block('wet_criterias'). Should there be an 'Execute_Query' ?
No idea... -
Pre-populating Server's Current Date in the form- How to??
The simplest way of doing this is writing one-line formcalc script.
This is not fair when the user changes his local system date/time.
I need to know how to pre-populate the server date in the form?
One way of doing this is writing a web service.
Any other simple solution to do this??
Thanks,
NithIf you are using LiveCycle Forms (7.x, ES, or ES2), with .pdf rendering on the server or the client, you can execute the script server side. Otherwise you have no other option but to access an external resource (REST, Web Service, JSP/servlet, etcetera) for the time, if you need to accurately capture form open time on the desktop.
Steve -
Is that possible to display the user selection data in the printable page?
Hi All,
I'm going to add a printablepage button on my page.
Here comes a questions.
Is that possible to display the user selection data in the printable page?
For example,
I have a table in the page,with 10 records.User select 5 of them.Can I display these 5 records in the printable page?
Please help.Hi Yannick,
Thanks a lot for the information. It worked.
The portlet data can be accessible using bindings, but parameter name can be different.
Meanwhile I have got one more scenario, where the Portlet and Task Flow placed in different pages of WCP Application. On change of data in the Portlet the application should navigate to another page where the Task Flow placed and displays selected data.
Basically I can not use any button for navigation. The navigation should happen once I do some action in Portlet.
Is this possible? If yes can you please let me know the steps?
Thanks in advance!
Somnath
Edited by: Somnath Basak on Dec 20, 2011 9:41 AM -
Error while saving the data in the form
Hi,
In forms 6i,after enteringthe data in the form,after pressing the save button it's giving error
An Error Prevented your changes from being commited
Anyone can help me out in this
Regards,
RRHi to all,
I have finished the form,now its saving.
Actually i ahce examined a form of same in other instance,in that form the data block which is using API in its trigger is first but the form which was not saving was second to other data block
When i changed the datablock order and compiled,now its saving the form.
Thanks for your support
Regards,
RR -
Reading selected data in the table control
Hi Friends,
I have final data in my table control now the user wants to select only few records from the displayed data, for that I kept a check box for selection, But my question is I am unable to read the selected data.
Actually user requirement is he has to update only the selected data from the displayed data in the table control.
Can any one tell me how to read the selected records after displaying in the table control.
Thanx in advance,
LineHi
If your table control has a check box, your internal table should have a field for it. Its value will be X if the checkbox is setted else it'll be SPACE.
So in the PAI u should read only the records where that flag is X:
LOOP AT ITAB WHERE MARK = 'X'.
ENDLOOP.
Max -
Selecting data in the table control
Hi Friends,
I have final data in my table control now the user wants to select only few records from the displayed data, for that I kept a check box for selection, But my question is I am unable to read the selected data.
Actually user requirement is he has to update only the selected data from the displayed data in the table control.
Can any one tell me how to read the selected records after displaying in the table control.
Thanx in advance,
LineHello Line,
As gopi has suggested do the following..
for the table control properties u have an option called W/SelColumn.
Give in some name (ROW_SEL)to that and also include a field CHK in the internal which is being passed to the table control.
and in the PAI of the table control module wirte like this...
Then in your code..
PROCESS BEFORE OUTPUT.
PBO FLOW LOGIC FOR TABLECONTROL 'TABCONTROL'
MODULE TABCONTROL_CHANGE_TC_ATTR.
MODULE TABCONTROL_CHANGE_COL_ATTR.
LOOP AT lt_final
INTO lw_final
WITH CONTROL tabcontrol
CURSOR tabcontrol-current_line.
MODULE tabcontrol_get_lines.
MODULE TABCONTROL_CHANGE_FIELD_ATTR
ENDLOOP.
MODULE status_0101.
PROCESS AFTER INPUT.
PAI FLOW LOGIC FOR TABLECONTROL 'TABCONTROL'
LOOP AT lt_final.
MODULE read_data.
MODULE tabcontrol_user_command.
ENDLOOP.
MODULE TABCONTROL_CHANGE_TC_ATTR.
MODULE TABCONTROL_CHANGE_COL_ATTR.
MODULE user_command_0101.
MODULE tabcontrol_user_command input.
if lt_final-chek = 'X'.
*put your logic here something like
move corresponding lt_final to gt_final.
*now you have selcted rows data in gt_final.
endif.
endmodule.
Regards -
Problem printing date on the form
Hello friends ,
I am doing form for the HR . Is there any special formatting needed to print the date on the form . I am doing this .
&t_payment-paydate& in the main window of the form .
t_payment is the table and paydate the date of payment . But instead of printing 1/22/2006 . It is printing 3//20/07/2 some junk value . Is it the format related problem ?
Any suggestions . You help would be greatly appreciated .
Regards & Thanks ,
HariHI,
You can do like this.
You make the following changes in the program
1. Define a character type field
data: v_payment_date(10) type c.
2. Assign the date value to the character field
write t_payment-paydate to v_payment_date.
You make the following changes in your sapscript text element.
instead of using field t_payment-paydate use v_payment_date.
Thanks
Ramakrishna -
ORA-13773: insufficient privileges to select data from the cursor cache
We are trying to create STS using the below query:
exec sys.dbms_sqltune.create_sqlset(sqlset_name => 'TEST_STS', -
sqlset_owner => 'SCOTT');
The below procedure will load sql starting with 'select /*MY_CRITICAL_SQL*/%' from cursor cache into STS TEST_STS.
DECLARE
stscur dbms_sqltune.sqlset_cursor;
BEGIN
OPEN stscur FOR
SELECT VALUE(P)
FROM TABLE(dbms_sqltune.select_cursor_cache(
'sql_text like ''select /*MY_CRITICAL_SQL*/%''',
null, null, null, null, null, null, 'ALL')) P;
dbms_sqltune.load_sqlset(sqlset_name => 'TEST_STS',
populate_cursor => stscur,
sqlset_owner => 'SCOTT');
END;
We were getting the following error: ORA-13761: invalid filter
After granting the below privileges to the user we are getting the below error:
Err msg:
ERROR at line 1:
ORA-13773: insufficient privileges to select data from the cursor cache
ORA-06512: at "SYS.DBMS_SQLTUNE", line 2957
ORA-06512: at line 10
For SQL Tuning Sets:
GRANT ADMINISTER ANY SQL TUNING SET TO scott;
For Managing SQL Profiles:
GRANT CREATE ANY SQL PROFILE TO scott;
GRANT ALTER ANY SQL PROFILE TO scott;
GRANT DROP ANY SQL PROFILE TO scott;
For SQL Tuning Advisor:
GRANT ADVISOR TO scott;
Others:
GRANT SELECT ON V_$SQL TO SCOTT;
GRANT SELECT ON V_$SQLAREA TO SCOTT;
GRANT SELECT ON V$SQLAREA_PLAN_HASH TO SCOTT;
GRANT SELECT ON V_$SQLSTATS TO SCOTT;
grant select on sys.DBA_HIST_BASELINE to SCOTT;
grant select on sys.DBA_HIST_SQLTEXT to SCOTT;
grant select on sys.DBA_HIST_SQLSTAT to SCOTT;
grant select on sys.DBA_HIST_SQLBIND to SCOTT;
grant select on sys.DBA_HIST_OPTIMIZER_ENV to SCOTT;
grant select on sys.DBA_HIST_SNAPSHOT to SCOTT;
Any info from your end to resolve the issue will be of great help.
ThanksWhat is the alert log reporting. Are you seeing any other errors than these in the alert log too?
-
In the Date Picker, How can I default to select * dates if the user does ..
In the Date Picker, How can I default to select * dates if the user does not select a date.
Thanks,
DougDoug,
Now lets say l want everythingCould you post some sample data and the output that you want to get..? It would be much easy to understand the requirements...
When you mean everything, I am assuming you need all possible dates possible between date1 and date2.
you can use... (from asktom.oracle.com).
1 select to_date('12-jan-2009','DD-MON-YYYY') + rownum -1
2 from ALL_OBJECTS
3 where rownum <= (to_date('20-jan-2009','dd-mon-yyyy') -
4* to_date('12-jan-2009','DD-MON-YYYY') +1 )
sql> /
TO_DATE('
12-JAN-09
13-JAN-09
14-JAN-09
15-JAN-09
16-JAN-09
17-JAN-09
18-JAN-09
19-JAN-09
20-JAN-09
9 rows selected.
For your case, since you have date1 and date2...
select to_date(:p12_date1,'DD-MON-YYYY') + rownum -1
from ALL_OBJECTS
where rownum <= (to_date(:p12_date2,'dd-mon-yyyy') -
to_date(:p12_date1,'DD-MON-YYYY') +1 )Should work.. in my opinion...Haven't tested the second one in Apex .
Is this what you were looking for ..?? If not, please elaborate...
Thanks,
Rajesh. -
How can get difference between 2 dates in the form of days
how can get difference between 2 dates in the form of days
Hi,
Check the following program:
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
Regards,
Bhaskar -
Hello,
i have a form( start.jsp) in which i can enter data about a person. The form data is bound to a person class which is saved in db. After submitting the form i inform the user ( in another page) that the submitting were successfull. But after coming back to the start.jsp to create a new person i still have the old person information data in the form. How can I have a form without my previous data.
My bean has to be in session scope and not in request scope.
thanksReinstantiate the Form DTO.
public void submitForm() {
myForm = new MyForm(); // Clears the form.
}
Maybe you are looking for
-
Hello, I have recently purchased a new Bluetooth speaker and I would like to use it with my already working home audio system which I control with the airplay feature on my Apple TV. I tried to use the airplay function on my iPhone 4S and connect the
-
"Full Screen" in Aperture 3.2.1 is on wrong screen.
"Full Screen" in Aperture 3.2.1 - I finally bought Aperture and tried editing using my macbook pro and cinema display. I am working with Aperture on the cinema display and selected "Full Screen," however, the "Full Screen" shows up on the laptop, no
-
Full screen playback in PE9 garbled - anyone else see this?
I mentioned this in a general post but I'll make it a specific question now - When I click on the "full screen" button near the top right of the interface, full screen playback has a corrupted area which corresponds with where the timescale is on the
-
Equivalent of java.sql.ResultSetMetaData
Hi, I'm looking for something which is equivalent to java.sql.ResultSetMetaData in Toplink. Does anyone know how this can be done ? Thanks, -Prashant
-
Add fiel FRBNR at Header level
Hi SAP community. I need to add the field Bill of landing (FRBNR) at header level for MType=561 in transaction MIGO or MB1C. Please indicate how could I reach that...step by step. Thanks la