Dynamic Insertion of graphics in Smart from
Hi guys,
I want to insert a dynamic graphic image from the presentation server into smart from its possible?
Reg,
Hriharan
Hi Mohd,
here's how to do it.
I presume you have alredy done charting in general with the cl_gui_chart_engine. You need the data and the customizing XML strings of that chart to print it out.
Follow this coding:
DATA: l_igs_viewer TYPE REF TO cl_igs_chart_engine,
i_igs_image_converter TYPE REF TO cl_igs_image_converter.
* Generate an Internet Graphics Server Chart Engine
CREATE OBJECT l_igs_viewer
EXPORTING
destination = 'GFW_ITS_RFC_DEST'. "IGS must exist, destination be installed
* IGS gets data and customizing
CALL METHOD l_igs_viewer->set_data( data_doc = l_ixml_doc ).
CALL METHOD l_igs_viewer->set_customizing(
custom_doc = l_ixml_custom_doc ).
* and now renders the chart.
CALL METHOD l_igs_viewer->execute
EXCEPTIONS
communication_error = 1
internal_error = 2
external_error = 3
OTHERS = 4.
* Next step ist to convert the image to an MS-BMP.
DATA:
l_image TYPE w3mimetabtype,
l_image_size TYPE w3param-cont_len,
l_image_type TYPE w3param-cont_type.
* get your image
CALL METHOD l_igs_viewer->get_image
IMPORTING
image = l_image
image_size = l_image_size
image_type = l_image_type.
* Create an image converter on the IGS
CREATE OBJECT i_igs_image_converter
EXPORTING
destination = 'GFW_ITS_RFC_DEST'.
i_igs_image_converter->input = 'image/gif'.
i_igs_image_converter->output = 'image/x-ms-bmp'. " !!!!
* Hand the image over
CALL METHOD i_igs_image_converter->set_image
EXPORTING
blob = l_image
blob_size = l_image_size.
* and convert it to a BMP
CALL METHOD i_igs_image_converter->execute
EXCEPTIONS
communication_error = 1
internal_error = 2
external_error = 3
OTHERS = 4.
IF sy-subrc = 0.
* if OK, get that image.
CALL METHOD i_igs_image_converter->get_image
IMPORTING
blob = l_image
blob_size = l_image_size
blob_type = l_image_type.
ENDIF.
ENDIF.
At this point, we have a BMP-24, and we are ready to save it to the SE78 BDS graphics system.
This is by far the slowest part of the story. Not applicable for mass printing, the conversion of a bitmap can take up to 1 minute!
DATA: l_docid TYPE stxbitmaps-docid.
PERFORM save_bitmap_bds
USING 'TEMP_CHART0181'
'GRAPHICS' 'BMAP' 'BCOL' 'BMP'
'Temporäre Grafik Chart 0181'(i16)
con_blank
con_x
con_x
CHANGING
l_image_size
l_image
l_docid.
The next part ist the form that converts and saves the BMP to BDS.
FORM save_bitmap_bds
USING p_name TYPE stxbitmaps-tdname
p_object TYPE stxbitmaps-tdobject
p_id TYPE stxbitmaps-tdid
p_btype TYPE stxbitmaps-tdbtype
p_format TYPE c
p_title TYPE bapisignat-prop_value
p_resident TYPE stxbitmaps-resident
p_autoheight TYPE stxbitmaps-autoheight
p_bmcomp TYPE stxbitmaps-bmcomp
CHANGING
p_image_size TYPE i
p_image TYPE w3mimetabtype
p_docid TYPE stxbitmaps-docid.
DATA: l_object_key TYPE sbdst_object_key.
DATA: l_tab TYPE ddobjname.
DATA: l_filename TYPE string,
l_bytecount TYPE i,
l_error TYPE c.
DATA: l_color(1) TYPE c.
DATA: l_bds_object TYPE REF TO cl_bds_document_set,
l_bds_content TYPE sbdst_content,
l_bds_components TYPE sbdst_components,
l_dpi TYPE stxbitmaps-resolution,
wa_bds_components TYPE LINE OF sbdst_components,
l_bds_signature TYPE sbdst_signature,
wa_bds_signature TYPE LINE OF sbdst_signature,
l_bds_properties TYPE sbdst_properties,
wa_bds_properties TYPE LINE OF sbdst_properties.
DATA wa_stxbitmaps TYPE stxbitmaps.
DATA:
l_width_tw TYPE stxbitmaps-widthtw,
l_height_tw TYPE stxbitmaps-heighttw,
l_width_pix TYPE stxbitmaps-widthpix,
l_height_pix TYPE stxbitmaps-heightpix,
l_bds_bytecount TYPE i,
l_docid TYPE stxbitmaps-docid.
CALL FUNCTION 'SAPSCRIPT_CONVERT_BITMAP_BDS'
EXPORTING
color = 'X'
format = 'BMP'
bitmap_bytecount = p_image_size
compress_bitmap = 'X'
IMPORTING
width_tw = l_width_tw
height_tw = l_height_tw
width_pix = l_width_pix
height_pix = l_height_pix
dpi = l_dpi
bds_bytecount = l_bds_bytecount
TABLES
bitmap_file = p_image
bitmap_file_bds = l_bds_content
EXCEPTIONS
format_not_supported = 1
no_bmp_file = 2
bmperr_invalid_format = 3
bmperr_no_colortable = 4
bmperr_unsup_compression = 5
bmperr_corrupt_rle_data = 6
tifferr_invalid_format = 7
tifferr_no_colortable = 8
tifferr_unsup_compression = 9
bmperr_eof = 10
OTHERS = 11.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Enqueue
PERFORM enqueue_graphic USING p_object
p_name
p_id
p_btype
CHANGING l_error.
CHECK l_error EQ con_blank.
SELECT SINGLE docid INTO p_docid
FROM stxbitmaps
WHERE tdobject = p_object
AND tdname = p_name
AND tdid = p_id
AND tdbtype = p_btype.
IF sy-subrc NE 0.
CLEAR p_docid.
ENDIF.
IF p_btype = c_bmon.
l_color = con_blank.
ELSE.
l_color = con_x.
ENDIF.
* Save bitmap in BDS
CREATE OBJECT l_bds_object.
wa_bds_components-doc_count = '1'.
wa_bds_components-comp_count = '1'.
wa_bds_components-mimetype = c_bds_mimetype.
wa_bds_components-comp_size = l_bds_bytecount.
APPEND wa_bds_components TO l_bds_components.
IF p_docid IS INITIAL. " graphic is new
wa_bds_signature-doc_count = '1'.
APPEND wa_bds_signature TO l_bds_signature.
CALL METHOD l_bds_object->create_with_table
EXPORTING
classname = c_bds_classname
classtype = c_bds_classtype
components = l_bds_components
content = l_bds_content
CHANGING
signature = l_bds_signature
object_key = l_object_key
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
PERFORM dequeue_graphic USING p_object
p_name
p_id
p_btype.
MESSAGE e012 WITH p_name 'BDS'.
ENDIF.
READ TABLE l_bds_signature INDEX 1 INTO wa_bds_signature
TRANSPORTING doc_id.
IF sy-subrc = 0.
p_docid = wa_bds_signature-doc_id.
ELSE.
PERFORM dequeue_graphic USING p_object
p_name
p_id
p_btype.
MESSAGE e012 WITH p_name 'BDS'.
ENDIF.
ELSE. " graphic already exists
********* read object_key for faster access *****
CLEAR l_object_key.
SELECT SINGLE * FROM stxbitmaps INTO wa_stxbitmaps
WHERE tdobject = p_object
AND tdid = p_id
AND tdname = p_name
AND tdbtype = p_btype.
SELECT SINGLE tabname FROM bds_locl INTO l_tab
WHERE classname = c_bds_classname
AND classtype = c_bds_classtype.
IF sy-subrc = 0.
SELECT SINGLE object_key FROM (l_tab) INTO l_object_key
WHERE loio_id = wa_stxbitmaps-docid+10(32)
AND classname = c_bds_classname
AND classtype = c_bds_classtype.
ENDIF.
******** read object_key end ********************
CALL METHOD l_bds_object->update_with_table
EXPORTING
classname = c_bds_classname
classtype = c_bds_classtype
object_key = l_object_key
doc_id = p_docid
doc_ver_no = '1'
doc_var_id = '1'
CHANGING
components = l_bds_components
content = l_bds_content
EXCEPTIONS
nothing_found = 1
OTHERS = 2.
IF sy-subrc = 1. " inconsistency STXBITMAPS - BDS; repeat check in
wa_bds_signature-doc_count = '1'.
APPEND wa_bds_signature TO l_bds_signature.
CALL METHOD l_bds_object->create_with_table
EXPORTING
classname = c_bds_classname
classtype = c_bds_classtype
components = l_bds_components
content = l_bds_content
CHANGING
signature = l_bds_signature
object_key = l_object_key
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
PERFORM dequeue_graphic USING p_object
p_name
p_id
p_btype.
MESSAGE e012 WITH p_name 'BDS'.
ENDIF.
READ TABLE l_bds_signature INDEX 1 INTO wa_bds_signature
TRANSPORTING doc_id.
IF sy-subrc = 0.
p_docid = wa_bds_signature-doc_id.
ELSE.
PERFORM dequeue_graphic USING p_object
p_name
p_id
p_btype.
MESSAGE e012 WITH p_name 'BDS'.
ENDIF.
ELSEIF sy-subrc = 2.
PERFORM dequeue_graphic USING p_object
p_name
p_id
p_btype.
MESSAGE e012 WITH p_name 'BDS'.
ENDIF.
ENDIF.
* Save bitmap header in STXBITPMAPS
wa_stxbitmaps-tdname = p_name.
wa_stxbitmaps-tdobject = p_object.
wa_stxbitmaps-tdid = p_id.
wa_stxbitmaps-tdbtype = p_btype.
wa_stxbitmaps-docid = p_docid.
wa_stxbitmaps-widthpix = l_width_pix.
wa_stxbitmaps-heightpix = l_height_pix.
wa_stxbitmaps-widthtw = l_width_tw.
wa_stxbitmaps-heighttw = l_height_tw.
wa_stxbitmaps-resolution = l_dpi.
wa_stxbitmaps-resident = p_resident.
wa_stxbitmaps-autoheight = p_autoheight.
wa_stxbitmaps-bmcomp = p_bmcomp.
INSERT INTO stxbitmaps VALUES wa_stxbitmaps.
IF sy-subrc <> 0.
UPDATE stxbitmaps FROM wa_stxbitmaps.
IF sy-subrc <> 0.
MESSAGE e012 WITH p_name 'STXBITMAPS'.
ENDIF.
ENDIF.
* Set description in BDS attributes
wa_bds_properties-prop_name = 'DESCRIPTION'.
wa_bds_properties-prop_value = p_title.
APPEND wa_bds_properties TO l_bds_properties.
CALL METHOD l_bds_object->change_properties
EXPORTING
classname = c_bds_classname
classtype = c_bds_classtype
object_key = l_object_key
doc_id = p_docid
doc_ver_no = '1'
doc_var_id = '1'
CHANGING
properties = l_bds_properties
EXCEPTIONS
OTHERS = 1.
PERFORM dequeue_graphic USING p_object
p_name
p_id
p_btype.
ENDFORM. "save_bitmap_bds
Your final part will now be to print out the graphic using a SmartForm. The method I showed above, saves the graphics always with the same name, in this case TEMP_CHART0181. So this method is not qualified for concurrent use by multiple users.
Try it out and see how slow this works unfortunately.
I hope SAP will provide a performant way soon to print charts with smartforms better than that above.
One last hint concerning size and resolution of the bitmap. Take a low resolution of say 50 dpi to gain higher performance but lower print quality. I never tried high resolutions of like 300dpi, it just became too slow for me and I qualified that as simply unpracticable.
I hope the coding snippets can help you.
Kind Regards
Ernst
Similar Messages
-
Is it possible to enable DOM events from a dynamically inserted QuickTime?
QuickTime in IE uses an <object> as a 'behaviour' template in order to enable DOM events. The behaviour <object> is referenced from the QuickTime plugin instance with IE's behavior style: style="behavior: url(#idof_behaviorobject)".
This works great for all QuickTime <object> instances declared before window.onload, but QuickTime <object> instances inserted into the DOM after that do not pick up the DOM events behaviour.
I do not know exactly how behaviour styles work and what I've read so far hasn't made me any the wiser. Are behaviours called on elements that reference them, only on page load, and therefore can't be picked up later?
Are there any known workarounds for enabling DOM events from QuickTime objects inserted after page load?
Just so you know - I've tried various methods of DOM insertion - innerHTML, createElement, and calling iframes with their own html page containing the necessary objects. None of these work for enabling DOM events on insertion after page load.
( P.S. I've cross-posted this question on stackoverflow here:
http://stackoverflow.com/questions/1336678/is-it-possible-to-enable-dom-events-f rom-a-dynamically-inserted-quicktime-object
If I get a working answer I'll copy it across. )
Cheers!
Stephen.I found forwarding the impl_processMouseEvent kind of works ... except when the graphics of the transparent child window floats over the owner window's chrome elements - in particular the title bar, minimise/maximise and resized borders won't accept forwarded mouse events this way.
Not true mouse transparency. -
Dynamic graphics in Smart Forms
Dear All:
I have a requirement in my SMARTFORM page development that i have to place a dynamic graphics and printout.
Does anyone know how to control the dynamic graphics in Smart Forms?
Any help whould be highly appreciated.
Many thanks in advance.
Regards,
ElvisHello,
You can call the graphic dynamically as per your requirement by calling the Graphic dynamically, For ex: Name of the graphic: &WA_ITAB-FIELD1& ( which is a field of IntTab ITAB taken into Work area WA_ITAB ).
Also please note that you cannot print / overlay text in a diamond, perhaps you can have a work around to print the graphic and beside the graphic you print the Customer short name. for this you can either define a table / template.
Hope this helps you.
Best Regards,Murugesh AS -
Linking FM 9 "At Insertion Point" graphics to an RH 8 project
Using Technical Communication Suite 2, I have built a structured FM 9 book in order to generate a RH 8 help system. This is a software user guide and I cannot avoid using inline graphics in some body elements. The book only has regular .fm documents (one document per topic), each document has English and French conditions, and I have used the Link command to link the book to a Robohelp project. If I save my FM book as a PDF, everything is perfect, which indicates there are no issues with either the EDD or the EDD_TPL files. In Robohelp, I use an .isf file for modifying RHMapping.css; everything but the following works fine.
The problem is that upon first linking the book when I create the RH project, RH insists on reading all the inline graphics (set as "At Insertion Point" in FM) as right-aligned paragraphs. There is nothing in my _TPL template that calls for right-aligning anything. Strange thing is that, if I then delete an image in FM and re-insert it, save the file, update the book and then update the RH project, the image is positioned properly in the body element. This would indicate to me that RH 8 is capable of handling inline graphics (like it always has). Needless to say however, that doing this for around 500 inline graphics would be an onerous solution.
But there is something else. Deleting and re-inserting the graphic in FM also changes the enclosing element's language condition to "As Is", which is an even greater problem, because I then end up with improper condition-based generation of topics. If I then set the element's condition to what I want it to be, the graphic is right-aligned again in RH.
I've been raking my brains for a while now and tried all kinds of kludges, in and out of my EDD - to no avail. If anyone else is currently struggling with, or has found a solution to, this problem, I would greatly appreciate hearing from you.
ThanksHi Mark,
I looked at the HTML and I see the problem, but didn't see anything specifically controlling this in the CSS. (I don't have much experience with CSS.)
BTW: I have used your website and Peter Grainge's for help with Help. Thank you!!!
The issue is:
There is a line of text in a Frame file (Lettered ptag). In the line of text, there is an anchored frame set to "At Insertion Point." Looks like this:
3. Click <image in anchored frame> (Add Attachment).
When the file is linked to RH, it is creates two <p> sections for the text and between those a separate <div> section aligned to the right for the image. This is the HTML:
<li type="a"><p class="Lettered"><?rh-cbt_start condition="Online, Print, Smart" ?>Click <?rh-cbt_end ?></p>
<?rh-cbt_start condition="Online, Print, Smart" ?><div align="right">
<img alt="add_attachments.png" id="image9" src="add_attachments.png"
style="margin-bottom: -3.000pt; margin-left: 1.500pt; margin-right: 0.882pt;"
width="18" height="21" border="0" />
</div><?rh-cbt_end ?>
<p class="Lettered"><?rh-cbt_start condition="Online, Print, Smart" ?> <?rh-cbt_end ?><?rh-cbt_start condition="Online, Print, Smart" ?>(Add Attachment).<?rh-cbt_end ?></p></li>
Appreciate any ideas or CSS suggestions to sort this out.
Thanks! -
SAPSCript - Inserting a graphic dunamically with ABAB-Code?
Hello,
I want to insert a graphic dynamically from my ABAB-printprogram. It should not be inserted in a specific window. And the graphic should not be predefined in the layoutset. Is there a possibility to do this. Thanks for your help. Regards, Lars.Hello Vinod,
we try to print a testlogo in the background of the printing form, depending on the SAP-System running. Is there a possibility for dynamically printing this graphic in the background without changing any existing layoutset. If not, we have to change every page in every layoutset and we have quit a lot of layoutsets. So we were thinking about the possibility of solving this problem with ABAP code, maybe in a function module. Regards, Lars.
P.S.: May it be possible printing a graphic that was transformed to a textelement with the function 'PRINT_TEXT'. -
Inserting a Graphic in adobe form using SFP
Hi all,
by using Form & Interface in SFP Transaction
i want to display a logo(image) not by using url(not images from hard disk), i want to use the image which is present in the sap (ie., i want to use the images in se78). How can i achieve this????
I used the following procedure, even though i couldnt achieve:
1. Select an existing node in the context, under which you want to create a graphic node.
2. In the context menu of the node, choose Create ® Graphic.
3. The system creates a graphic node under the selected node. Enter the required data about the graphic in the Properties window under the form context.
You can choose from the following graphic types:
○ Graphic Reference
Choose this option if you want to insert a graphic from its address (URL). The URL can point to a Web server or to a file system. You must be able to access the graphic at the specified URL. This means that you may have to configure appropriate access rights for Adobe Document Services (ADS). Graphics stored in MIME Repository cannot be accessed through a URL. To use these graphics, choose Graphic Content.
○ Graphic Content
Choose this option if you want to specify graphic content using a field. This field contains all image information at runtime. The graphics must be in MIME Repository.
4. The entries you need to make depend on whether you chose Graphic Reference or Graphic Content in the last step.
○ If you have chosen Graphic Reference as your graphic type, enter the URL of the graphic.
Note
In Adobe LiveCycle Designer, you can choose whether the system gets the graphic at runtime, or whether the graphic is embedded in the form. For more information, see the online help in Adobe Designer.
○ If you have specified Graphic Content as your graphic type, you must do the following:
■ In Field, enter a field name from the interface. The field must have the type STRING (graphical data is Base64-coded) or XSTRING (for binary-coded graphical data).
■ Enter a valid MIME type, such as u2019image/bmpu2019.
5. Under Conditions, enter the prerequisites that need to be met before the graphic node is processed at runtime and displayed in the form.
I cant get the image....................................
Please provide the step by step details.....
Thanks,
VichuThe correct code is as follows,
REPORT ZTEST_GRAPHIC_MIME.
Data Declaration ***
DATA: fm_name TYPE funcname, " Captures the Generated Function Module name
w_sfpoutputparams TYPE sfpoutputparams, " Print and Spool Dialog settings
w_docparams TYPE sfpdocparams. " Print and Spool Dialog settings
DATA: w_binary TYPE xstring, " Contains converted logo
w_base64 TYPE string, " Contains image type
v_name type STXBITMAPS-TDNAME. " Contains logo name which is in se78
Function Modules ***
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME' " Will contain the name of generated Function Module Name...
EXPORTING
I_NAME = 'ZTEST_GRAPHIC'
IMPORTING
E_FUNCNAME = fm_name
E_INTERFACE_TYPE =
CALL FUNCTION 'FP_JOB_OPEN' " To Open the Form for Printing...
CHANGING
IE_OUTPUTPARAMS = w_sfpoutputparams
EXCEPTIONS
CANCEL = 1
USAGE_ERROR = 2
SYSTEM_ERROR = 3
INTERNAL_ERROR = 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.
v_name = 'ENJOY'. " Name of the logo as in se78
w_base64 = 'image/bmp'. " Image Type
CALL METHOD CL_SSF_XSF_UTILITIES=>GET_BDS_GRAPHIC_AS_BMP " Get a BDS Graphic in BMP Format (Using a Cache)
EXPORTING
P_OBJECT = 'GRAPHICS'
P_NAME = v_name " Name of the logo as in se78
P_ID = 'BMAP'
P_BTYPE = 'BCOL' " BCOL'( whether the image is in color or black and white )
RECEIVING
P_BMP = w_binary
EXCEPTIONS
NOT_FOUND = 1
INTERNAL_ERROR = 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.
CALL FUNCTION fm_name " Generated Adobe Form Function Module(/1BCDWB/SM00000173)...
EXPORTING
/1BCDWB/DOCPARAMS = w_docparams
GRAPHIC_BINARY = w_binary
GRAPHIC_BASE64 = w_base64
IMPORTING
/1BCDWB/FORMOUTPUT =
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3
OTHERS = 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.
CALL FUNCTION 'FP_JOB_CLOSE' " To Close The Form For Printing
IMPORTING
E_RESULT =
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3
OTHERS = 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. -
I cannot insert a graphic image in a new composition: win 7, tb 24
At times when composing a new e-mail I cannot insert a graphic image in the message. I have tried both the Insert button and the Insert icon. This does not happen all the time; but, when it does happen I can't seem to make it work. My system is a Win 7 with Thunderbird 24.3.0.5. I have tried inserting different graphic images and have tried all combinations in the Image Properties pop-up window.
I have closed and reopened Thunderbird. I have restarted my system. I have closed all windows except Thunderbird. Nothing helps. Help! Thank you, Bill GrayBill Gray here again. I find that if I open another Write window, then copy/paste my entire e-mail from the initial window -- I can insert graphics into the new window.
What happens in Thunderbird to make this happen? This has happened a number of times. But, at least now I know that I can open a new Write window and get around the problem. Yet, I am still stuck with the nagging question: Why does this happen?
Thank you and God bless, Bill Gray -
Dynamic insertion of elements based on dynamic condition
I need to achieve the following:
Input:
<Customer>
<name>Name1</name>
<email>Email1</email>
<phone>Phone1</phone>
<Number>Num1</Number>
<Customer>
Output:
<Customer>
<name>Name1</name>
<email>Email1</email>
<phone>Phone1</phone>
<Number>Num1</Number>
<Addresses>
<Address>add1</Address>
<Address>add1</Address>
<Address>add1</Address>
</Addresses>
<Customer>
Based on the number of Addresses that exist for the customer, multiple <Address> elements should be added.
I can't determine number of Addresses at the beginning. It is deterrmined dynamically based on certain condition.
So each time when the condition is met, I need to get the count of <Address> elements that exist and insert the new one last.
My logic:
Switch (case) ==> Add <Address> only if condition is met
count ==> count(bpws:getVariableData('outputVariable','payload','/ns1:Customer/ns1:Addresses')) ==> 0 first time
<Addresses>
<Address>add1</Address> ===> Now I need to insert this.
</Addresses>
I have the following in my bpel:
<assign name="AssignInsertAfterExisting">
<copy>
<from expression="count(bpws:getVariableData('outputVariable','payload','/ns1:Customer/ns1:Addresses'))"/>
<to variable="NumberOfAds"/>
</copy>
<copy>
<from expression="'123 street'"/>
<to variable="nextAddress"/>
</copy>
<bpelx:insertAfter>
<bpelx:from variable="nextAddress"/>
<bpelx:to variable="outputVariable" part="payload"
query="/ns1:Customer/ns1:Addresses/ns1:Address squareBrakets NumberOfAds squareBrakets"/>
</bpelx:insertAfter>
</assign>
But with the above I am receiving the folllowing error:
Assign Operation Misuse.
The to-spec does not yield any data; insertAfter operation cannot be performed.
Please check the BPEL source at line number ..
I can I insert dynamically insert elements into array. I have seen the example provided in samples, but my problem is little different than that.
Edited by: user10367892 on Aug 4, 2009 3:16 AMappend is appending value of variable to existing element, instead of creating a new element in the array:
For Eg:
Input:
<bpelx:append>
<bpelx:from variable="nextAddress"/>
<bpelx:to variable="outputVariable" part="payload" query="/ns1:Customer/ns1:Addresses/ns1:Address"/>
</bpelx:append>
Output if nextAddress = Address2 and if <Address>Address1</Address> already exists
<Customer>
<Addresses>
<Address>Address1Address2</Address>
</Addresses>
</Customer> -
Headers: can you insert a graphic?
I am trying to insert a graphic (logo) in my header. However, when I select the Media browser and drag the image, it always lands on top of the table itself -- I cant figure out how to move it to the header (or get it to "float" about the table so I can move it anywhere...
Thanks.You can put any picture in a cell > Inspector > Graphics > Fill.
The page header will not take pictures but can be typed in & coloured using the options on the top of the Font menu.
You can put any logo / picture etc in a text box and place it on the page where you want it.
Removing the excess rows & columns from any tables gives you more room to play with..
Best. -
Inserting on graphic on HRRCF_PUBLICATION_EXT
I have created a custom smartform for HRRCF_PUBLICATION_EXT and inserted a graphic in the Header sections.
Although the form executes it does not display the Graphic.
Please let me know if I need to do anything else apart from this for the image to work.
I have created the graphic for other smartforms for ER correspondence and they work as expected, I am not sure if I am missing something on HRRCF_PUBLICATION_EXT
Note: I have not made any changes on the Forms design from SFP tcode.
ThanksYes Graphic file was loaded successfully through se78.
When the form HRRCF_PUBLICATION_EXT is executed in place of the graphic I see an empty box with a tiny X mark on the corner top and when I move the mouse over the image it displays the graphic file name that was loaded through se78.
Thanks -
How to insert data into a table from an xml document
using the XmlSql Utility, how do I insert data into a table from an xml document, using the sqlplus prompt.
if i use the xmlgen.insertXML(....)
requires a CLOB file, which i dont have, only the xml doc.
Cant i insert directly from the doc to the table?
the xmlgen examples I have seen first convert a table to a CLOB xmlString and then insert it into another table.
Isnt there any other way?Your question is little perplexing.
If you're using XML SQL Utility from
the commandline, just use putXML.
java OracleXML putXML
null -
How to print 4 copies of smart from in a single print
Dear All,
i have one smartform. i have attached my smart form to an output type. if i am printing through that output type, it has to print 4 copies of smartform. Hoe to do this?
i have 6 windows in my smart from in different different place. i have used main window for my table data inthe middle of the smart from.
How can i print 4 copies of smart from in a single print ?
Thanks In advance.Hi Vishnu,
I hope you have used a print program which will be triggered from the output type. In your print program where you are calling your smartform, just include that piece of code inside DO 4 times.
........... Write the code here to call your smartform.
ENDDO.
I hope by doing this you will be able to achieve your requirement.
BR,
Vinit -
How can i create a dynamic structure based on my input from a select-option
Hello,
This is to develop a custom report in FI for G/L Balance based on company code.
I have an input select-option for Company code.
Based on the range of company code my output layout should be modified.
I am not very much sure to create a dynamic internal based on the input from a select-option.
Can any one please let me know how can i do this.
I would appreciate for anyone who turns up quickly.
Thank you,
With regs,
Anitha Joss.See the following program, it builds a dynamic internal table based on the company codes from the select option.
report zrich_0001 .
type-pools: slis.
field-symbols: <dyn_table> type standard table,
<dyn_wa>.
data: alv_fldcat type slis_t_fieldcat_alv,
it_fldcat type lvc_t_fcat.
data: it001 type table of t001 with header line.
selection-screen begin of block b1 with frame title text-001.
select-options: s_bukrs for it001-bukrs.
selection-screen end of block b1.
start-of-selection.
select * into table it001 from t001
where bukrs in s_bukrs.
perform build_dyn_itab.
* Build_dyn_itab
form build_dyn_itab.
data: index(3) type c.
data: new_table type ref to data,
new_line type ref to data,
wa_it_fldcat type lvc_s_fcat.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = 'PERIOD' .
wa_it_fldcat-datatype = 'CHAR'.
wa_it_fldcat-intlen = 6.
append wa_it_fldcat to it_fldcat .
loop at it001.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = it001-bukrs .
wa_it_fldcat-datatype = 'CHAR'.
wa_it_fldcat-intlen = 4.
append wa_it_fldcat to it_fldcat .
endloop.
* Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = it_fldcat
importing
ep_table = new_table.
assign new_table->* to <dyn_table>.
* Create dynamic work area and assign to FS
create data new_line like line of <dyn_table>.
assign new_line->* to <dyn_wa>.
endform.
Regards,
Rich Heilman -
How do I run a database procedure that inserts data into a table from withi
How do I run a database procedure that inserts data into a table from within a Crystal report?
I'm using CR 2008 with an Oracle 10i database containing a number of database tables, procedures and packages that provide the data for the reports I'm developing for my department. However, I'd like to know when a particular report is run and by whom. To do this I have created a database table called Report_Log and an associated procedure called prc_Insert_Entry that inserts a new line in the table each time it's called. The procedure has 2 imput parameters (Report_Name & Username), the report name is just text and I'd like the username to be the account name of the person logged onto the PC. How can I call this procedure from within a report when it's run and provide it with the 2 parameters? I know the procedure works, I just can't figure out how to call it from with a report.
I'd be grateful for any help.
ColinHi Colin,
Just so I'm clear about what you want:
You have a Stored procedure in your report. When the report runs, you want that same procedure to write to a table called Report_Log.
If this is what you want the simple answer is cannot be done. Crystal's fundamental prupose is to read only, not write. That being said, there are ways around this.
One way is to have a trigger in your database that updates the Report_Log table when the Stored Procedure is executed. This would be the most efficient.
The other way would be to have an application run the report and manage the entry.
Good luck,
Brian -
Urgent! How to insert into and query video from database in forms???
In forms 6i demos CD, There is a demo form ocxvideo.fmb,
but it just for video in file system.
I want to read *.avi file from file system, and insert into
database, and query from my forms.
I create table with long raw, with default forms wizard,
long raw for [image] item in forms.
I change item type to ActiveX ,and right_click mouse
==>[Insert object]==>Oracle Veideo control.
still can not insert avi data into database and query from my forms.
Please give me some advice to solve this problem?
Thank you very much!
Ming-An
[email protected]In forms 6i demos CD, There is a demo form ocxvideo.fmb,
but it just for video in file system.
I want to read *.avi file from file system, and insert into
database, and query from my forms.
I create table with long raw, with default forms wizard,
long raw for [image] item in forms.
I change item type to ActiveX ,and right_click mouse
==>[Insert object]==>Oracle Veideo control.
still can not insert avi data into database and query from my forms.
Please give me some advice to solve this problem?
Thank you very much!
Ming-An
[email protected]
Maybe you are looking for
-
Setup scan to folder on HP LaserJet 200 colorMFP M276nw
hello, I am trying to set up my printer to scan to a nework folder. HP LaserJet 200 colorMFP M276nw OSX 10.9.4 WLAN (both printer and desktop on same network) Here's the problem; no matter what I try, I cannot get the printer to scan directly to a n
-
Hi SAP Minds, Please provide the answers for the following and guide me to learn Payroll technically.. what is offcycle payroll? what are the Function Modules used to read the data from Offcycle payroll? what are the Function modules used to read R
-
Sunopsis_memory_engine_default data server missing,
Hi, We are setting up a ODI installation to load data into a planning application. We have followed most of the steps in John Goodwin's Blog (thank you John) but we are missing the configuration for the default data server under technologies-> sunops
-
Interpret result of "lsnrctl status"
LSNRCTL> stat Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MUMSOLGACDEV01)(PORT=152 1))) TNS-01169: The listener has not recognized the password LSNRCTL> stat Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MUMSOLGACDEV01)(PORT=152
-
Updating 3rd parties db table using JDBC adapter at sender side
hi all. i just want to know how i can updated the 3rd party db table field. my scenario is just to retrieve data from 3rd party DB table where the condition is like " to select records where processed (field name ) = " ". but i just need to update th