Program to compare Standard Texts
Hi,
Can you please let me know the Program to compare the Standard Texts in SAP.
Thanks,
Madhuri.
Hi,
I would like to compare Standard Texts across the systems and also would like to compare two standard texts.
I would like to have the comparision option to the standard texts similar to the SE39 Transaction for programs.
Thanks,
Madhuri.
Similar Messages
-
How to compare standard texts used in Sapscripts different Environments
Hello Gurus,
I need to compare the standards texts found in different environments.
1. I would like to know if there is a program /Tcode that does this.
2. In what table are the standard texts kept?
3. How can I access the contents of another environment?
Thanks gurus.
Parvezhii parvez
standard tables are stored in the table so10
u can access throu standard prog RSTXFCOM
RSTXR3TR to transport
reward points if useful
regards
Jaipal -
Module Pool Programming - Calling SAP Standard Text Screen
Hi Gurus
I am working on Module Pool Programming...In the one of the screen there is a column named "Description" where I need to keep a Button to call a SAP standard text editing screen and what ever information I enter in the field should be downloadable
is this option possible?If so...Plz send me the Sample code
Thanks
GaneshHi Gani,
I can help you till getting the text editor in your module pool program.
TOP
PROGRAM ZREDDY_TEXT.
constants: line_length type i value 132.
data:
reference to wrapper class of control
g_editor type ref to cl_gui_textedit,
reference to custom container: necessary to bind TextEdit Control
g_editor_container type ref to cl_gui_custom_container,
g_repid like sy-repid, " getting program name
g_ok_code like sy-ucomm, " return code from screen
g_mytable(132) type c occurs 0, " getting the text of table
g_mycontainer(30) type c, " string for the containers
v_result(256) type c, " getting the text of table control
gw_thead like thead, " for header information
it_line type table of tline with header line. " internal table of type tline
PBO
MODULE STATUS_0900 OUTPUT.
SET PF-STATUS 'ZTEXT'.
SET TITLEBAR 'xxx'.
if g_editor is initial.
create control container
create object g_editor_container
exporting
container_name = 'CUSTOM_CONTROL' " Make sure when you create custom container in layout give name as Custom container
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
g_mycontainer = 'CUSTOM_CONTROL'.
create calls constructor, which initializes, creates and links
TextEdit Control
create object g_editor
exporting
parent = g_editor_container
wordwrap_mode =
cl_gui_textedit=>wordwrap_off
cl_gui_textedit=>wordwrap_at_fixed_position
cl_gui_textedit=>WORDWRAP_AT_WINDOWBORDER
wordwrap_position = line_length
wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
refresh g_mytable. " to initialize table upon OK_CODE 'BACK' at PAI
endif.
ENDMODULE. " STATUS_0900 OUTPUT
Cheers!!
Balu
Edited by: Balu CH on Oct 22, 2008 8:55 PM -
ABAP program - How to use Standard Text
Hi.
I want to read standard text. i know there are Fn module Read_text. but not sure how to call in program.
ThanksHI,
check this and pass the required fields
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = <id>
language = <langu>
name = <name>
object =<object>
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = itab
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
Comparing two text files in a UNIX using shell programming
Hi All,
Sorry for posting a UNIX shell query on Database forums.
I want to compare two text files using shell programming. The two text files are actually Business Objects output extracted in a text format. The two output files are not in a tabular format and are no way similar in looking. I want to take one file e.g. file1 as an input file and compare each line of file1 with the other file e.g. file2. During comparison I want to extract the differences found in another file and if possible the similar data as well.
Below is how the files will look like
File 1:
BILL1000000 1111251 122222
RMG1A2 023425100000000010001 11135 102650111100
UHL1 *6999999* *454540001* Weekly *000*
0544424556895PS DATA 01MPS100000/03 MR A A PERTH UTL1234567893106923455053106900000010000005
File 2:
AUTO
APPLICATION=STARTPOINT
START
PROCESSING DATE=01012011
1598301270320099TEST C E 00000031615 123456
7854301276140499TES P 00000062943 234567
UHL1 *6999999* *454540001* Weekly *000*
5569931233333499/123456789 00000013396 345678
4471931233333499ER K J 00000031835123456789012456789
33652931233333499E J L 00000034729123456789012567890
45783123333349921/123456789 00000039080 678901
1452931233333499T R 00000040678123456789012789012
59689312333334994/987654321 00000048614 890123
4112931233333499/987654321 00000060631 901234
1236931217836899 K S 00000043704 012345
END
As you can see above the file are not at all matching except for one record UHL1, but its just an example. As an output I would like to have a third file containing all these records, highlighting the differences, and a fourth file where in only the matched records should get populated.
Please post any useful scripts related to the above scenario.
Many Thanks.
Edited by: 848265 on 06-Apr-2011 04:13Hi;
For your issue i suggest close your thread here as changing thread status to answere and move it to Forum Home » Linux which you can get more quick response
Regard
Helios -
Facing a problem with standard text in custom program
Hi,
As per my requirement i need to create a standard text (transaction code s010 ) in custom program using below code. But when click save button then it needs to be come out of the screen without click back button.
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
FID = G_THEAD-TDID
FLANGUAGE = G_THEAD-TDSPRAS
FNAME = G_THEAD-TDNAME
FOBJECT = G_THEAD-TDOBJECT
SAVE_DIRECT = 'X'
FFORMAT = '*'
TABLES
FLINES = I_TLINE
EXCEPTIONS
NO_INIT = 1
NO_SAVE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
ELSE.
CALL FUNCTION 'EDIT_TEXT'
EXPORTING
HEADER = G_THEAD
SAVE = 'X'
TABLES
LINES = I_TLINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
LINESIZE = 3
NAME = 4
OBJECT = 5
TEXTFORMAT = 6
COMMUNICATION = 7
OTHERS = 8.
IF SY-SUBRC <> 0.
ENDIF.
ENDIF.
Can you please help me how to do this
Regards
nagBut when click save button then it needs to be come out of the screen without click back button.
can you explain me, what do you mean by that.
~satya -
Track Changes log of a specified Standard Text?
Hello Experts,
Am looking to develop a report (change log report) for standard texts, for example, (pls. note all input parameters of this standard text are same)
Yesterday the user entered the standard text as
This is yesterdays standard text
And again user has changed today it to
This is todays standard text
Pls. let me know that is there any standard transaction to track these changes log? is there any table (seems STXH, STXL are not helps me) to store these changes? how can i retrive all these changes for a specified stanrd text?
Thank youHi M_S_Raju_0613,
I never heard of a tracking feature for standard texts - standard sapscript texts must be an add on SAP took from any non-SAP development and never integrated well. So you have to change documents for them or the pool tables where they are stored.
If only some texts and only special changes are in question, you may create a special program that stores a copy of the text and compares the copy to the actual text in a recurring job.
No better idea, sorry.
Regards,
Clemens -
hi to all abap Gurus
what is standard text in script ?how to use it > where do we use it ? we know that the use is reusability . how it is reusable . and it is used to support for multiple languages . pls tell in detail . pls dont give any link . points will bre rewarded defintilely for good answers . pls urgent. pls give som esample coding on this .Standard Text is nothing but Global Text.
Suppose you have to display footer/header info. whenever you create a s cript for ur org.your caompany details,logo etx. instead of writing them everytime, if you careta a global text u can include them wherevr u want.
Mainly we are using standard texts to avoid hardcoding in scripts or smartforms.
If you need to include the name of your company and address in the form you
just include a standard text in your form by include statement(script) and by
include text dropdown in forms. If in later part of time your company address
change you need to change the standard text not to touch the form. This is the
way standard text helps us.
in Tcode SO10, u create a text and give a name activate it.
Here is the sample code to send script through E mail..
*& Report ZRICHA_OTF_PDF
report zricha_otf_pdf
message-id zz.
CONSTANTS *
constants : c_x(1) type c value 'X', " For constant value
c_otf(3) type c value 'OTF', " For format
c_u(1) type c value 'U'. " Mail Option
VARIABLES *
data : v_rqident type tsp01-rqident, " For Spool Number
v_rqclient type tsp01-rqclient, " For Client
v_rqo1name type tsp01-rqo1name, " For Object name
v_spool type tsp01-rqident, " For Spool Number
v_spool1 type tsp01-rqident. " For Spool Number
FLAGS *
data : f_spool type c.
INTERNAL TABLES *
Internal table for sending mails
data: it_pdf like tline occurs 10 with header line,
it_xi_pdf like tline occurs 0 with header line,
it_html like solisti1 occurs 0 with header line,
it_xi_temp like bapiqcmime occurs 0 with header line,
it_xi_mime(255) type c occurs 0 with header line.
For sending mail
data: it_objpack like sopcklsti1 occurs 2 with header line.
Internal table for Single List with Column Length 255
data : it_objbin like solisti1 occurs 10 with header line.
Internal table for Single List with Column Length 255
data : it_objtxt like solisti1 occurs 10 with header line.
Internal table for Structure of the API Recipient List
data : it_reclist like somlreci1 occurs 5 with header line.
Structure of the API Recipient List
data: x_doc_chng like sodocchgi1.
Internal table for storing the variants
data : begin of it_variant1 occurs 0,
variant like varid-variant,
end of it_variant1.
Internal table to store variants for the programs
data: it_variant2 like it_variant1 occurs 0 with header line.
Internal table for storing the selected values
data it_return type ddshretval occurs 0 with header line.
Internal table for storing the mail-ids
data : begin of it_mailid occurs 0,
kokrs like csks-kokrs,
kostl like csks-kostl,
datbi like csks-datbi,
telx1 like csks-telx1,
end of it_mailid.
Internal table for storing the mail-ids
data : it_mailid1 like it_mailid occurs 0 with header line.
SELECTION SCREEN *
data : v_char type char50.
selection-screen begin of block b1 with frame title text-001.
select-options: s_email for v_char no intervals
lower case
no-display.
select-options: s_email1 for v_char no intervals
lower case
no-display.
selection-screen end of block b1.
selection-screen begin of block a1 with frame title text-028.
selection-screen begin of line.
parameters : p_c1 as checkbox.
selection-screen comment 3(66) text-026 for field p_c1.
selection-screen end of line.
parameters : p_set like tsp1d-papart matchcode object zh_tsp1d.
selection-screen skip 1.
parameters : p_vara1 type rs38m-selset.
selection-screen end of block a1.
selection-screen begin of block a2 with frame title text-029.
selection-screen begin of line.
parameters : p_c2 as checkbox.
selection-screen comment 3(56) text-027 for field p_c1.
selection-screen end of line.
parameters : p_set1 like tsp1d-papart matchcode object zh_tsp1d.
selection-screen skip 1.
parameters : p_vara2 type rs38m-selset.
selection-screen end of block a2.
AT SELECTION SCREEN ON VALUE REQUEST
at selection-screen on value-request for p_vara1.
For fetching the variants available for the program
perform fetch_variants.
at selection-screen on value-request for p_vara2.
For fetching the variants available for the program
perform fetch_variants1.
AT SELECTION SCREEN
at selection-screen.
For Validation
perform validation.
START OF SELECTION *
start-of-selection.
To get the output data and mail
perform fetch_data.
END OF SELECTION *
end-of-selection.
if f_spool = c_x.
message e000 with 'Spool Not Generated'(060).
endif.
*& Form fetch_data
To get the output data and mail
form fetch_data .
To send the output to spool
perform generate_spool.
endform. " fetch_data
*& Form generate_spool
To send the output to spool
form generate_spool .
data: l_params like pri_params,
l_days(1) type n value 2,
l_count(3) type n value 1,
l_valid type c,
l_valid1 type c,
l_params1 like pri_params.
data: l_device type usr01-spld.
*Get the printer name for the user
select single spld into l_device from usr01 where bname = sy-uname.
if l_device is initial.
l_device = 'LOCL'.
endif.
For report-1
if p_c1 = 'X'.
Setting the print parameters
call function 'GET_PRINT_PARAMETERS'
exporting
destination = l_device
copies = l_count
list_name = sy-uname
list_text = 'SUBMIT ... TO SAP-SPOOL'(008)
release = c_x
new_list_id = c_x
expiration = l_days
LINE_SIZE = 255
LINE_COUNT = 65
layout = p_set
sap_cover_page = space
cover_page = space
receiver = 'SAP*'(010)
department = 'System'(011)
no_dialog = c_x
importing
out_parameters = l_params
valid = l_valid.
if l_valid <> space.
clear v_spool.
Fetch the spool number b4 submit
perform fetch_recent_spool using v_spool.
Submitting the program to spool
submit rkaep000 to sap-spool
using selection-set p_vara1
spool parameters l_params
without spool dynpro
and return.
clear v_spool1.
Fetch the spool number after submit
perform fetch_recent_spool using v_spool1.
if v_spool = v_spool1.
f_spool = c_x.
if p_c2 is initial.
stop.
endif.
else.
Checking the format ( ABAP/OTF)
perform format_check tables s_email.
endif.
else.
message e000 with 'Problem in print settings'(003).
stop.
endif.
endif.
For Report-2
if p_c2 = 'X'.
Setting the print parameters
call function 'GET_PRINT_PARAMETERS'
exporting
destination = l_device
copies = l_count
list_name = sy-uname
list_text = 'SUBMIT ... TO SAP-SPOOL'(008)
release = c_x
new_list_id = c_x
expiration = l_days
LINE_SIZE = 200
LINE_COUNT = 65
layout = p_set1
sap_cover_page = space
cover_page = space
receiver = 'SAP*'(010)
department = 'System'(011)
no_dialog = c_x
importing
out_parameters = l_params1
valid = l_valid1.
if l_valid1 <> space.
clear v_spool.
Fetch the spool number b4 submit
perform fetch_recent_spool using v_spool.
Submitting the program to spool
submit gp3diehxy88snfj0391v7kf9ek7050 to sap-spool
using selection-set p_vara2
spool parameters l_params1
without spool dynpro
and return.
clear v_spool1.
Fetch the spool number after submit
perform fetch_recent_spool using v_spool1.
if v_spool = v_spool1.
message e000 with 'Spool Not Generated'(060).
stop.
endif.
Checking the format ( ABAP/OTF)
perform format_check tables s_email1.
else.
message e000 with 'Problem in print settings'(003).
stop.
endif.
endif.
endform. " generate_spool
*& Form fetch_recent_spool
Fetch the recent spool number generated
form fetch_recent_spool using p_v_spool type tsp01-rqident .
data: l_user like tsp01-rq2name.
clear : v_rqident,
v_rqclient,
v_rqo1name.
l_user = sy-uname.
Get latest Spool No
select single rqident
rqclient
rqo1name
into (v_rqident , v_rqclient , v_rqo1name)
from tsp01
where rqcretime = ( select max( rqcretime )
from tsp01
where rq2name eq l_user
and rqfinal eq '.' ).
if sy-subrc = 0 .
p_v_spool = v_rqident.
endif.
endform. " fetch_recent_spool
*& Form format_check
Checking the format ( ABAP/OTF)
form format_check tables p_s_email structure s_email.
data : l_objtype like rststype-type.
call function 'RSTS_GET_ATTRIBUTES'
exporting
authority = 'SP01'(019)
client = v_rqclient
name = v_rqo1name
part = 1
importing
objtype = l_objtype
exceptions
fb_error = 1
fb_rsts_other = 2
no_object = 3
no_permission = 4.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
if l_objtype(3) = c_otf.
Convert OTF Spool to PDF
perform convert_otf2pdf tables p_s_email.
else.
Convert ABAP Spool to PDF
perform convert_abap2pdf tables p_s_email.
endif.
endform. " format_check
*& Form convert_otf2pdf
Convert OTF Spool to PDF
form convert_otf2pdf tables p_p_s_email structure s_email .
clear it_pdf.
refresh it_pdf.
data : l_bytecount type i.
Fn. to get the PDF format
call function 'CONVERT_OTFSPOOLJOB_2_PDF'
exporting
src_spoolid = v_rqident
no_dialog = 'X'
importing
pdf_bytecount = l_bytecount
tables
pdf = it_pdf
exceptions
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11.
if sy-subrc = 0.
For page format
perform page_format tables p_p_s_email.
else.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " convert_otf2pdf
*& Form convert_abap2pdf
Convert ABAP Spool to PDF
form convert_abap2pdf tables p_p_s_email structure s_email.
clear it_pdf.
refresh it_pdf.
data : l_bytecount type i.
Fn. to convert to PDF format
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = v_rqident
no_dialog = 'X'
importing
pdf_bytecount = l_bytecount
tables
pdf = it_pdf
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11.
if sy-subrc = 0.
For page formatting
perform page_format tables p_p_s_email.
else.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " convert_abap2pdf
*& Form send_mail
For sending mail
form send_mail tables mail structure s_email .
Structures and internal tables for the send data
data: objpack like sopcklsti1 occurs 2 with header line,
objhead like solisti1 occurs 1 with header line,
objbin like solisti1 occurs 0 with header line,
objtxt like solisti1 occurs 10 with header line,
reclist like somlreci1 occurs 5 with header line.
data: doc_chng like sodocchgi1,
tab_lines like sy-tabix.
Data for the status output after sending
data: sent_to_all like sonv-flag.
clear: it_reclist, it_reclist[],
it_objtxt , it_objtxt[],
it_objpack, it_objpack[],
it_objbin , it_objbin[],x_doc_chng.
loop at it_html.
objbin-line = it_html-line.
append objbin.
clear objbin.
endloop.
Create the document which is to be sent
doc_chng-obj_name = 'List'(012).
doc_chng-obj_descr = 'Mail'(013).
Heading
objtxt-line = 'Mail with pdf attachment'(014).
append objtxt.
clear objtxt.
Size
describe table objtxt lines tab_lines.
read table objtxt index tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
Fill the fields of the packing_list for the main document:
clear objpack-transf_bin.
The document needs no header (head_num = 0)
objpack-head_start = 1.
objpack-head_num = 0.
Body
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'(015).
append objpack.
Create the attachment (the list itself)
describe table objbin lines tab_lines.
Fill the fields of the packing_list for the attachment:
objpack-transf_bin = 'X'.
Header
objpack-head_start = 1.
objpack-head_num = 0.
Body
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'PDF'(016).
objpack-obj_name = 'Attachment'(017).
objpack-obj_descr = 'Mail with pdf Attachment'(018).
objpack-doc_size = tab_lines * 255.
append objpack.
*-Fill the mail recipient list
loop at mail.
reclist-receiver = mail-low.
reclist-rec_type = c_u.
append reclist.
clear: reclist,
mail.
endloop.
*-Send the document by calling the SAPoffice API1 module for sending
*-documents with attachments
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = doc_chng
put_in_outbox = c_x
commit_work = c_x
importing
sent_to_all = sent_to_all
tables
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
exceptions
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
others = 99.
case sy-subrc .
when 0.
message i000 with 'Mail has been sent successfully'(006).
when others.
message e000 with 'Problem in sending the mail'(023).
endcase.
endform. " send_mail
*& Form page_format
For page foramtting
form page_format tables email structure s_email .
data : l_lines type i,
l_temp(500) type c,
l_offset type p,
l_lineslen(2) type p,
l_mimelen(2) type p,
l_tabix like sy-tabix.
clear : it_xi_pdf,
it_xi_temp.
refresh : it_xi_pdf,
it_xi_temp.
it_xi_pdf[] = it_pdf[].
Reformat the line to 255 characters wide (code from SAP)
clear: l_temp, l_offset, it_xi_temp.
describe table it_xi_pdf lines l_lines.
describe field it_xi_pdf length l_lineslen in character mode.
describe field it_xi_temp length l_mimelen in character mode.
loop at it_xi_pdf.
l_tabix = sy-tabix.
move it_xi_pdf to l_temp+l_offset.
if l_tabix = l_lines.
l_lineslen = strlen( it_xi_pdf ).
endif.
l_offset = l_offset + l_lineslen.
if l_offset ge l_mimelen.
clear it_xi_temp.
it_xi_temp = l_temp(l_mimelen).
append it_xi_temp.
shift l_temp by l_mimelen places.
l_offset = l_offset - l_mimelen.
endif.
if l_tabix = l_lines.
if l_offset gt 0.
clear it_xi_temp.
it_xi_temp = l_temp(l_offset).
append it_xi_temp.
endif.
endif.
endloop.
clear : it_xi_mime,
it_xi_mime[].
loop at it_xi_temp.
it_xi_mime(255) = it_xi_temp-line.
append it_xi_mime.
clear it_xi_mime.
endloop.
Final Data
clear : it_html,
it_html[].
it_html[] = it_xi_mime[].
For sending mail
perform send_mail tables email.
endform. " page_format
*& Form fetch_variants
For fetching the variants available for the program
form fetch_variants .
data : l_program like rs38m-programm value 'RKAEP000',
l_vara1 type dfies-fieldname value 'P_VARA1'.
clear : it_variant1,
it_variant1[].
Get variants
perform get_variants tables it_variant1
using l_program.
F4 Help
if not it_variant1[] is initial.
perform get_f4_help tables it_variant1
using l_vara1
changing p_vara1.
else.
message e000 with 'No variants available for report1'(054).
endif.
endform. " fetch_variants
*& Form validation
For Validation
form validation .
data : l_pro1 like rs38m-programm value 'RKAEP000',
l_pro2 like rs38m-programm value 'GP3DIEHXY88SNFJ0391V7KF9EK7050',
l_c1,
l_c2.
If both check-box are unchecked
if p_c1 is initial
and p_c2 is initial.
message e000 with 'Check any one check-box'(049).
endif.
If checked without varaint
if not p_c1 is initial and p_vara1 is initial.
message e000 with 'Please give any one of the variant for report1'(055).
endif.
If checked without varaint
if not p_c2 is initial and p_vara2 is initial.
message e000 with 'Please give any one of the variant for report2'(061).
endif.
Reading the variant and fetching the mail-ids
if p_c1 = c_x.
l_c1 = '1'.
clear : s_email,
s_email[].
perform read_variants tables it_mailid
s_email
using p_vara1
l_pro1
l_c1.
if s_email[] is initial.
message e000 with 'No Id available for given Cost report1'(066).
else.
sort s_email by low.
delete adjacent duplicates from s_email comparing low.
endif.
endif.
Reading the variant and fetching the mail-ids
if p_c2 = c_x.
clear : s_email1,
s_email1[].
l_c2 = '2'.
perform read_variants tables it_mailid1
s_email1
using p_vara2
l_pro2
l_c2.
if s_email1[] is initial.
message e000 with 'No Id available for given Cost report2'(067).
else.
sort s_email1 by low.
delete adjacent duplicates from s_email1 comparing low.
endif.
endif.
endform. " validation
*& Form GET_VARIANTS
Fetching Variants
form get_variants tables p_it_variant structure it_variant1
using p_v_program type rs38m-programm.
select variant
from varid
into table p_it_variant
where report = p_v_program.
endform. " GET_VARIANTS
*& Form GET_F4_HELP
text
form get_f4_help tables p_it_variant1 structure it_variant1
using p_l_vara1 like dfies-fieldname
changing p_p_vara like p_vara1.
Fn. for Pop-Up
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = p_l_vara1
value_org = 'S'
display = ' '
tables
value_tab = p_it_variant1
return_tab = it_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
p_p_vara = it_return-fieldval.
else.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " GET_F4_HELP
*& Form FETCH_VARIANTS1
text
form fetch_variants1 .
data : v_program1 like rs38m-programm value 'GP3DIEHXY88SNFJ0391V7KF9EK7050',
l_vara2 type dfies-fieldname value 'P_VARA2'.
clear : it_variant2,
it_variant2[].
Get Variants
perform get_variants tables it_variant2
using v_program1.
F4 Help
if not it_variant2[] is initial.
perform get_f4_help tables it_variant2
using l_vara2
changing p_vara2.
else.
message e000 with 'No variants available for report2'(050).
endif.
endform. " FETCH_VARIANTS1
*& Form read_variants
Reading the variant and fetching the mail-ids
form read_variants tables p_it_mailid structure it_mailid
p_s_email structure s_email
using p_p_vara1 like p_vara1
p_l_pro1 like rs38m-programm
p_l_c1 type c.
data : l_temp(44),
it_valutab like rsparams occurs 0 with header line.
ranges : r_cocen for csks-kostl.
Function Module to get the variant contents
call function 'RS_VARIANT_CONTENTS'
exporting
report = p_l_pro1
variant = p_p_vara1
tables
valutab = it_valutab
exceptions
variant_non_existent = 1
variant_obsolete = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
clear : r_cocen,
r_cocen[].
loop at it_valutab where selname = 'KOSTL'
or selname = '_C-CCTR'.
Getting the range of cost centers
if it_valutab-option = 'BT'.
r_cocen-low = it_valutab-low.
For Conversion Routine
perform conversion using r_cocen-low.
r_cocen-high = it_valutab-high.
For Conversion Routine
perform conversion using r_cocen-high.
r_cocen-option = 'BT'.
r_cocen-sign = 'I'.
append r_cocen.
clear r_cocen.
endif.
Getting the single cost centers
if it_valutab-option = 'EQ'.
r_cocen-low = it_valutab-low.
For Conversion Routine
perform conversion using r_cocen-low.
r_cocen-option = 'EQ'.
r_cocen-sign = 'I'.
append r_cocen.
clear r_cocen.
endif.
endloop.
If no cost centers
if not r_cocen[] is initial.
select kokrs
kostl
datbi
telx1
from csks
into table p_it_mailid
where kostl in r_cocen.
if p_it_mailid[] is initial.
if p_l_c1 = '1'.
message e000 with 'No IDs available for report1'(059).
elseif p_l_c1 = '2'.
message e000 with 'No IDs available for report2'(062).
endif.
endif.
Deleting the blank entries
delete p_it_mailid where telx1 = space.
clear l_temp.
read table p_it_mailid index 1.
l_temp = p_it_mailid-telx1.
data : l_check.
loop at p_it_mailid where telx1 <> l_temp.
l_check = c_x.
endloop.
For checking the unique ids
if l_check = c_x.
if p_l_c1 = '1'.
message e000 with 'No unique mail-ids for report1'(058).
elseif p_l_c1 = '2'.
message e000 with 'No unique mail-ids for report2'(065).
endif.
endif.
Populating the IDs for the cost centers
loop at p_it_mailid.
set locale language sy-langu.
translate p_it_mailid-telx1 to lower case.
set locale language space .
concatenate p_it_mailid-telx1 '@allergan.com' into l_temp.
p_s_email-low = l_temp.
p_s_email-sign = 'I'.
p_s_email-option = 'EQ'.
append p_s_email.
clear p_s_email.
endloop.
else.
if p_l_c1 = '1'.
message e000 with 'No Cost Center Available for report1'(057).
elseif p_l_c1 = '2'.
message e000 with 'No Cost Center Available for report2'(063).
endif.
endif.
endform. " read_variants
*& Form CONVERSION
For Conversion Routine
form conversion using p_it_valutab_low type c.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = p_it_valutab_low
importing
output = p_it_valutab_low.
endform. " CONVERSION
chk this one to send script to pdf
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
plzz refer to this link..it will solve ur problem
Re: Sending a PDF document as an attachment
sending the mail with PDF attachment
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450
Regards
Sree -
Program to compare versions of programs and customizing
Hi All,
Does anyone know of a program that compare between versions of programs
and customizing between clients ?
I need a program that compare between all programs in the system, not just a single program.
Thanks,
Michal.Hi,
I have the same requirement and checked out how transaction SE39 did remote compare. This is basically RFC enabled function module RPY_PROGRAM_READ. I wrote this program which can mass compare a list of programs between 2 systems ( normally one being local )
I have build in a rather primitive logic to ignore empty lines and different option to ignore ident and spaces. If a program with 1000 lines has one extra line in one of the systems at line 300, the program will say there are 700 lines differing. The purpose is to find programs there are not exactly identical - a 'normal' remote compare can then be done. The program is created as hotspot that takes you to SE38.
The program compares ABAP code and program texts.
I have tested this on 4.6C and ECC 5.0 systems
The usual disclaimer about no responsibility applies.
report z_remote_compare .
Mass remote compare programs
Ole Elmose QRAOLEE 2007-03-12
tables : rpy_prog, rfcdes.
Selection screen
selection-screen begin of block b1 with frame title text-001.
select-options: s_prname for rpy_prog-progname obligatory.
parameters : p_rfcde1 type rfcdes-rfcdest obligatory default 'LOCAL'.
parameters : p_rfcde2 type rfcdes-rfcdest obligatory.
selection-screen end of block b1.
selection-screen skip 1.
selection-screen begin of block b2 with frame title text-002.
parameters : rb_all radiobutton group spac.
parameters : rb_lead radiobutton group spac.
parameters : rb_no radiobutton group spac.
selection-screen end of block b2.
DATA DECLARATION
types : begin of gty_finaltab,
progname type progname,
version1 type versno,
version2 type versno,
changeon1 type rdir_udate,
changeon2 type rdir_udate,
changeby1 type unam,
changeby2 type unam,
count_abap1 type sytabix,
count_abap2 type sytabix,
error_abap type sytabix,
error_text type sytabix,
gen_text(60) type c,
selk type c,
color type lvc_t_scol, " color
end of gty_finaltab.
data : gt_source1 type standard table of abapsource.
data : ls_source1 type abapsource.
data : gt_source2 type standard table of abapsource.
data : ls_source2 type abapsource.
data : gt_textelem1 type standard table of textpool.
data : ls_textelem1 type textpool.
data : gt_textelem2 type standard table of textpool.
data : ls_textelem2 type textpool.
data : ls_progdata1 type rpy_prog.
data : ls_progdata2 type rpy_prog.
data : ld_progname type programm.
data : ld_spaces(6) type c.
data : ld_error_abap type sytabix.
data : ld_error_text type sytabix.
data : ld_count_abap1 type sytabix.
data : ld_count_abap2 type sytabix.
data : ld_count1 type sytabix.
data : ld_percent type i.
data : ld_text(50) type c.
data : ld_text_pro(4) type c.
data : ld_i_save type c.
data : gt_finaltab type standard table of gty_finaltab.
data : ls_finaltab type gty_finaltab.
data : ls_bdcdata type bdcdata.
data : gt_bdcdata type standard table of bdcdata.
ALV DATA ***
constants : lc_pick(7) type c value 'PICK'.
type-pools : slis.
data :
gt_fieldcat type slis_t_fieldcat_alv,
ls_fieldcat type slis_fieldcat_alv,
id_layout type slis_layout_alv,
repname type syrepid,
gt_events type slis_t_event.
Cell color
data: ls_cellcolor_tab type lvc_s_scol,
lt_cellcolor_tab type lvc_t_scol,
ls_color type lvc_s_colo.
CONSTANTS : lc_fname TYPE char7 VALUE 'STATUS'.
START-OF-SELECTION.
start-of-selection.
sort s_prname.
delete adjacent duplicates from s_prname.
describe table s_prname lines ld_count1.
loop at s_prname.
clear ld_error_abap.
clear ld_error_text.
clear ld_count_abap1.
clear ld_count_abap2.
clear ls_finaltab.
ld_progname = s_prname-low.
perform progressbar using sy-tabix ld_count1.
First RFC call for program details
clear gt_source1. clear gt_textelem1. clear ls_progdata1.
Get first ( local ) version
call function 'RPY_PROGRAM_READ'
destination p_rfcde1
exporting
language = sy-langu
program_name = ld_progname
with_includelist = ''
only_source = ' '
only_texts = ' '
read_latest_version = 'X'
with_lowercase = ' '
importing
prog_inf = ls_progdata1
tables
INCLUDE_TAB RPY_REPO OPTIONAL
source = gt_source1
textelements = gt_textelem1
exceptions
cancelled = 1
not_found = 2
permission_error = 3
communication_failure = 4
system failure = 5.
case sy-subrc.
when 0.
Delete empty lines
delete gt_source1 where line is initial.
Ignore program name in text
delete gt_textelem1 where id = 'R'.
delete gt_textelem1 where id = 'H'.
Number of lines of ABAP
describe table gt_source1[] lines ld_count_abap1 .
when 1.
ls_finaltab-gen_text = text-003.
when 2.
ls_finaltab-gen_text = text-004.
when 3.
ls_finaltab-gen_text = text-005.
when 4.
ls_finaltab-gen_text = text-006.
when 5.
ls_finaltab-gen_text = text-007.
endcase.
Second RFC call for program details
clear gt_source2. clear gt_textelem2. clear ls_progdata2.
Get remote version
call function 'RPY_PROGRAM_READ'
destination p_rfcde2
exporting
language = sy-langu
program_name = ld_progname
with_includelist = ''
only_source = ' '
only_texts = ' '
read_latest_version = 'X'
with_lowercase = ' '
importing
prog_inf = ls_progdata2
tables
INCLUDE_TAB RPY_REPO OPTIONAL
source = gt_source2
textelements = gt_textelem2
exceptions
cancelled = 1
not_found = 2
permission_error = 3
communication_failure = 4
system failure = 5.
case sy-subrc.
when 0.
Delete empty lines
delete gt_source2 where line is initial.
Ignore program name in text
delete gt_textelem2 where id = 'R'.
delete gt_textelem2 where id = 'H'.
Number of lines of ABAP
describe table gt_source2[] lines ld_count_abap2 .
when 1.
ls_finaltab-gen_text = text-003.
when 2.
ls_finaltab-gen_text = text-004.
when 3.
ls_finaltab-gen_text = text-005.
when 4.
ls_finaltab-gen_text = text-006.
when 5.
ls_finaltab-gen_text = text-007.
endcase. .
Remove space depending on readiobutton selection
if rb_all is initial.
if rb_no is initial.
Remove multiple+leadeing spaces
loop at gt_source1 into ls_source1.
condense ls_source1-line.
modify gt_source1 from ls_source1 transporting line.
endloop.
loop at gt_source2 into ls_source2.
condense ls_source2-line.
modify gt_source2 from ls_source2 transporting line.
endloop.
else.
Remove all spaces
loop at gt_source1 into ls_source1.
condense ls_source1-line no-gaps.
modify gt_source1 from ls_source1 transporting line.
endloop.
loop at gt_source2 into ls_source2.
condense ls_source2-line no-gaps .
modify gt_source2 from ls_source2 transporting line.
endloop.
endif.
endif.
Compare ABAP SOURCE
clear ld_error_abap.
loop at gt_source1 into ls_source1.
read table gt_source2 index sy-tabix into ls_source2.
if ls_source2-line ne ls_source1-line.
ld_error_abap = ld_error_abap + 1.
endif.
endloop.
Compare texts
clear ld_error_text.
loop at gt_textelem1 into ls_textelem1.
read table gt_textelem2 into ls_textelem2 index sy-tabix.
translate ls_textelem2-entry to lower case.
translate ls_textelem1-entry to lower case.
if ls_textelem2-id ne ls_textelem1-id
or ls_textelem2-key ne ls_textelem1-key
or ls_textelem2-entry ne ls_textelem1-entry.
ld_error_text = ld_error_text + 1.
endif.
endloop.
Put to ALV output table
ls_finaltab-progname = ld_progname.
ls_finaltab-version1 = ls_progdata1-version.
ls_finaltab-version2 = ls_progdata2-version.
ls_finaltab-changeon1 = ls_progdata1-mod_date.
ls_finaltab-changeon2 = ls_progdata2-mod_date.
ls_finaltab-changeby1 = ls_progdata1-mod_user.
ls_finaltab-changeby2 = ls_progdata2-mod_user.
ls_finaltab-count_abap1 = ld_count_abap1.
ls_finaltab-count_abap2 = ld_count_abap2.
ls_finaltab-error_abap = ld_error_abap.
*Adding the color.
if ls_finaltab-error_abap is initial.
ls_color-col = 5. "green
else.
ls_color-col = 6. "red
endif.
clear ls_cellcolor_tab.
clear lt_cellcolor_tab.
clear ls_finaltab-color.
ls_cellcolor_tab-fname = 'ERROR_ABAP'. " Field name to color
ls_color-int = 1.
ls_color-inv = 0.
move ls_color to ls_cellcolor_tab-color.
insert ls_cellcolor_tab into table
lt_cellcolor_tab.
insert lines of lt_cellcolor_tab
into table ls_finaltab-color.
ls_finaltab-error_text = ld_error_text.
*Adding the color.
if ls_finaltab-error_text is initial.
ls_color-col = 5. "green
else.
ls_color-col = 6. "red
endif.
clear ls_cellcolor_tab.
clear ls_finaltab-color.
ls_cellcolor_tab-fname = 'ERROR_TEXT'." Field name to color
ls_color-int = 1.
ls_color-inv = 0.
move ls_color to ls_cellcolor_tab-color.
insert ls_cellcolor_tab into table
lt_cellcolor_tab.
insert lines of lt_cellcolor_tab
into table ls_finaltab-color.
Move to internal table
append ls_finaltab to gt_finaltab.
endloop.
clear ls_finaltab.
perform fieldcat.
perform f4000_events changing gt_events.
perform layout_build using id_layout.
perform grid_disp.
FORM f4000_events_init *
--> I_EVENTS *
form f4000_events changing i_events type slis_t_event.
data: line_event type slis_alv_event.
clear line_event.
line_event-name = 'PF_STATUS_SET'.
line_event-form = 'F4200_PF_STATUS_SET'.
append line_event to i_events.
clear line_event.
line_event-name = 'USER_COMMAND'.
line_event-form = 'F4300_USER_COMMAND'.
append line_event to i_events.
endform. " f3000_events_init
FORM f4200_pf_status_set *
--> I_EXTAB *
form f4200_pf_status_set using i_extab type slis_t_extab.
refresh i_extab.
The PF status is an exact copy of the PF status 'STANDARD' of program
SAPLSALV
set pf-status 'STANDARD' excluding i_extab.
endform. "f4200_pf_status_set
FORM layout_build *
--> P_LAYOUT *
form layout_build using p_layout type slis_layout_alv.
p_layout-box_fieldname = 'SELK'. " Checkbox
p_layout-get_selinfos = 'X'.
p_layout-f2code = 'PICK' . " Doppelklickfunktion
p_layout-key_hotspot = 'X'.
p_layout-info_fieldname = 'COL'.
p_layout-coltab_fieldname = 'COLOR'.
p_layout-zebra = 'X'. " Stripes
p_layout-colwidth_optimize = 'X'. " Optimize
endform. " layout_build
FORM GRIDDISP *
form grid_disp.
repname = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = repname
I_CALLBACK_PF_STATUS_SET = ''
I_CALLBACK_USER_COMMAND = ''
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
i_grid_title = ws_title
I_GRID_SETTINGS =
is_layout = id_layout
it_fieldcat = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
i_save = ld_i_save
is_variant = ds_variant
it_events = gt_events[]
it_event_exit = gt_event_exit[]
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = gt_finaltab
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " grid_disp
*& Form fieldcat
text
--> p1 text
<-- p2 text
form fieldcat.
data: pos type i.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'PROGNAME'.
ls_fieldcat-seltext_m = 'Program name'.
ls_fieldcat-seltext_s = 'Program name'.
ls_fieldcat-seltext_l = 'Program name'.
ls_fieldcat-ddictxt = 'L'.
ls_fieldcat-hotspot = 'X'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'VERSION1'.
ls_fieldcat-seltext_m = 'Version 1'.
ls_fieldcat-seltext_s = 'Version 1'.
ls_fieldcat-seltext_l = 'Version 1'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'VERSION2'.
ls_fieldcat-seltext_m = 'Version 2'.
ls_fieldcat-seltext_s = 'Version 2'.
ls_fieldcat-seltext_l = 'Version 2'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'CHANGEON1'.
ls_fieldcat-seltext_m = 'Changed on 1'.
ls_fieldcat-seltext_s = 'Changed on 1'.
ls_fieldcat-seltext_l = 'Changed on 1'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'CHANGEON2'.
ls_fieldcat-seltext_m = 'Changed on 2'.
ls_fieldcat-seltext_s = 'Changed on 2'.
ls_fieldcat-seltext_l = 'Changed on 2'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'CHANGEBY1'.
ls_fieldcat-seltext_m = 'Changed by 1'.
ls_fieldcat-seltext_s = 'Changed by 1'.
ls_fieldcat-seltext_l = 'Changed by 1'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'CHANGEBY2'.
ls_fieldcat-seltext_m = 'Changed by 2'.
ls_fieldcat-seltext_s = 'Changed by 2'.
ls_fieldcat-seltext_l = 'Changed by 2'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'COUNT_ABAP1'.
ls_fieldcat-seltext_m = 'Count 1'.
ls_fieldcat-seltext_s = 'Count 1'.
ls_fieldcat-seltext_l = 'Count 1'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'COUNT_ABAP2'.
ls_fieldcat-seltext_m = 'Count 2'.
ls_fieldcat-seltext_s = 'Count 2'.
ls_fieldcat-seltext_l = 'Count 2'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'ERROR_ABAP'.
ls_fieldcat-seltext_m = 'ABAP differences'.
ls_fieldcat-seltext_s = 'ABAP differences'.
ls_fieldcat-seltext_l = 'ABAP differences'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'ERROR_TEXT'.
ls_fieldcat-seltext_m = 'Text differences'.
ls_fieldcat-seltext_s = 'Text differences'.
ls_fieldcat-seltext_l = 'Text differences'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
pos = pos + 1.
ls_fieldcat-col_pos = pos.
ls_fieldcat-tabname = 'gt_fulltab'.
ls_fieldcat-fieldname = 'GEN_TEXT'.
ls_fieldcat-seltext_m = 'Status'.
ls_fieldcat-seltext_s = 'Status'.
ls_fieldcat-seltext_l = 'Status'.
ls_fieldcat-ddictxt = 'L'.
append ls_fieldcat to gt_fieldcat.
clear ls_fieldcat.
endform. " fieldcat
*& Form progressbar
text
-->P_SY_TABIX text
-->P_LD_COUNT1 text
form progressbar using p_tabix p_count.
ld_percent = 100 * ( p_tabix - 1 ) / p_count.
move ld_percent to ld_text_pro.
ld_text = '% of programs processed'.
concatenate ld_text_pro ld_text into ld_text
separated by space.
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
percentage = ld_percent
text = ld_text.
endform. " progressbar
FORM f4300_user_command *
--> UCOMM *
--> SELFIELD *
form f4300_user_command using ucomm like sy-ucomm
ls_selfield type slis_selfield.
Per default, keep position and refresh screen with DISPLAY
ls_selfield-col_stable = 'X'.
ls_selfield-row_stable = 'X'.
ls_selfield-refresh = 'X'.
case ucomm.
Double-click **********************
when lc_pick. " Doubleclick anywhere on line + hotspot
read table gt_finaltab index ls_selfield-tabindex into
ls_finaltab.
clear gt_bdcdata.
perform bdc_dynpro using 'SAPLWBABAP' '0100'.
perform bdc_field using 'RS38M-FUNC_EDIT' 'X'.
perform bdc_field using 'rs38m-programm'
ls_finaltab-progname.
perform bdc_field using 'BDC_OKCODE' '=SHOP'.
call transaction 'SE38' using gt_bdcdata mode 'E'.
when others.
endcase.
clear ucomm.
endform. " f4300_user_command
*& Form bdc_dynpro
text
-->PROGRAM
-->DYNPRO
form bdc_dynpro using
program
dynpro.
clear ls_bdcdata.
ls_bdcdata-program = program.
ls_bdcdata-dynpro = dynpro.
ls_bdcdata-dynbegin = 'X'.
append ls_bdcdata to gt_bdcdata.
endform. " bdc_dynpro
FORM BDC_FIELD *
--> FNAM *
--> FVAL *
form bdc_field using
fnam
fval.
clear ls_bdcdata.
ls_bdcdata-fnam = fnam.
move fval to ls_bdcdata-fval .
append ls_bdcdata to gt_bdcdata.
endform. " bdc_field
Please use these text symbols :
001 Selection data
002 Text compression
003 RFC Call cancelled
004 Program does not exits on RFC target
005 RFC permission denied
006 RFC communication error
007 RFC system failure
and these selection texts :
P_RFCDE1 RFC Connection 1
P_RFCDE2 RFC Connection 2
RB_ALL Include identation
RB_LEAD Ignore leading spaces
RB_NO Ignore all spaces
S_PRNAME Program name
Hope someone finds this useful.
- Ole Elmose -
If condition in standard text in so10
Hi,
Im using a standard text where ive written an IF condition but its not working.Im calling that text in my program using READ_TEXT, TEXT_CONTROL_REPLACE and TEXT_SYMBOL_REPLACE function modules.Im not using sapscript or smartform.All my dynamic variables are working fine but for my IF condition what is happening is IF statement is also true and ELSEIF is also true.The statement under if is also getting printed and statement under elseif is also getting printed.
Could anyone help please.
Regards,
Nidhi.Standard text " if conditions " dont work other than scripts and smartforms.
to my surprise, if conditions have not worked even when I used them as includes in ADOBE forms.
Please handle the conditions in your program itself.
<< Moderator message - Point begging removed >>
Edited by: Rob Burbank on Sep 30, 2011 2:49 PM -
How to use standard texts in smartforms
Hi Friends,
How to use standard texts in smartforms, ie in scripts we are using standard texts using tr so10.
thanks in advance,
regards,
sharma.For long text
method1
Create TEXT node- general attributes change text type to include text
then you can input text name/text object/text id/language
method2
create PROGRAM LINE node - use FM READ_TEXT to read it to a internal table
then use LOOP or TABLE node to display it
For TEXT module(For foreign language)
Tr-code:smartforms -- choose Text module(not choose form)--create a text module object
then enter smartform Create TEXT node- general attributes change text type to text module
input the text module name which created by above
btw SO10 is just for Scriptform, in smartforms we use text module to replace SO10 -
Getting error while transporting standard text
Hi,
I am trying to transport the standard text(created in SO10), by using RSTXTRAN program but i am getting this error message " Changes to objects are not allowed in correction/Repair" after click on "Trsfr texts to corr" button.
I am doing in the following way.
Program : RSTXTRAN
Given
Text key - Object - TEXT
TEXT KEY Name - ZTEXT
ID - ST
Language EN
Execute
enter -> click on button called transf text to corr -> it is throwing message " Transfer text to a correction" i am saying "yes" then its throwing the following error " Changes to objects are not allowed in correction/Repair"
Regards,
Sarath.JHi,
In order to assign a standard text to your request. You should be the owner of the request. Though you have a task on your name under that request, it doesnt allow you to assign. You will be getting the error which you got now.
Regards -
How do I Hide the text printed from a standard Text Element in SAP Script?
Hi,
I have created one SAP Script which gets printed from IW33 using a standard print program.
In config the standrad SAP script is replaced by the zsap script.
Since the Zscript is printed from a Standard print program, I had to keep all the text elements used by the original(standard) SAP script.
I only kept the text elemets and commented out the printing part.
But still some values are printing. How do I hide these text element values?
I want to delete whatever its printing from these text element. Icant delete the standard text elemetns , otherwise the standard print program will give error.Hi,
I am not printing any text under these text element in my zscript.
I had to include these standard text elemets as they are called from the standard print program using which my zscript is getting printed.
for example:
/E OPERATION
Under operation i didnot print anything. Still some values which are passed in text element Operation by the print program is being printed in the form. i want to hide/delete these values.
how do I do that? -
# appearing in standard text.
Hello,
I have created a standard text and using the text in a smartform. There are many words with apostrope in them. For eg consumer's. But when it is printed in the smartform , the text is printed as consumer#s. Other standard texts which contains words with apostrope are printing correctly in the smartform. I have compared properties of both the standard texts and they are same. No styles have been used in either case. But , only in one case the "#" symbol is being printed instead of the apostrophe.
Can you please suggest what might be the issue?
Thanks and Regards,
Laxman Pai.Hi laxman,
MODIFY <dbtab> FROM TABLE <itab>.
Regards,
Clemens
Ooops, sorry, wrong thread! (related to [Modify ztable from internal table|Modify ztable from internal table])
Edited by: Clemens Li on Jan 17, 2011 1:23 PM -
How to get the standard texts available in a smartforms
Hi Experts,
How can we find out the standard texts that are exist in a particular smartform . is there any table/function module available to get those standard texts? I am finding the table STXFTXT, from that I am getting only textline. But I need the standard text names that are used in a smartform.
Thanks & Regards,
Sureshhi,
1,Use SO10 Tcode to write standard text in Smartform.
2.For long text
method1
Create TEXT node- general attributes change text type to include text
then you can input text name/text object/text id/language
method2
create PROGRAM LINE node - use FM READ_TEXT to read it to a internal table
then use LOOP or TABLE node to display it
For TEXT module(For foreign language)
Tr-code:smartforms -- choose Text module(not choose form)--create a text module object
then enter smartform Create TEXT node- general attributes change text type to text module
input the text module name which created by above
3.
1. take function module name of the smartform.
2. goto se37 and type that fm name.
3. goto attributes tab
4. double click on either program or include .
5. There u can find all the subroutines used inside smartform.
6. search for "perform %move using %textkey-name".
4.Standard Texts are created in SO10 Tcode and stored in STXH table with OBject ,ID and NAME parameters. We can use Read_Text FM to read the text.
check the tables STXH & STXL.
5.
How to CAll Standard Text in Smart Forms
In SFs you can insert the standard tests using the TEXT node. Create a TEXT NODE. Then in the GENERAL ATTRIBUTES of this TEXT node select INCLUDE TEXT in the TYPE option. Then you have to enter the text name, object , ID and language in the provided fields. Then if you dont want any error if there is no text in the corresponding text then CHECK the check box "No errors if no text available.
Maybe you are looking for
-
Accounting total value of item conditions
Dear Experts, I have a scenario where rebates(volume discounts) are accrued at an item level through an item condition and are hence released to accounts also at an item level. As a result of this there are too many accrual entries getting posted for
-
How do I install Lion on more than one Mac
How do I install Lion on more than one Mac? As I have a MacBook Pro and a iMac?
-
Quicktime 7.3 Overrun error
I upgraded to 7.2 then did the 7.3 Quicktime + iTunes update right after now I am unable to start iTunes or Quicktime. Here is the error I receive when starting Quicktime http://blacktemplars.org/files/quicktime/overrun_error.png I tried uninstalling
-
Portege M100 runs at 600MHz after BIOS/FRIMWARE upgrade
Hello, I got a Portege M100 this week, installed Debian GNU/Linux (Sid) on it and nearly everything was fine. Then I upgraded to the latest BIOS/FIRMWARE (from V1.10 to V1.50) and now my Pentium M 1200 MHz runs at half speed. I can't also load cpufre
-
Screnn problems on my power book
Is there someone who could help me out... I bought my new powerbook in dec 2004 and I have huge probms with my sceen since one year. From time to time, the whole screen is only lines. As I am in graphic design it's quite a problem for my job. I think