How to Create Highlighted text through the API

I am trying to create a script that goes through a document and cut/pastes specific elements to another document in FrameMaker 7.1.
So far, I can open a document and if an element is already highlighted/selected, i can cut the whole element using F_ApiCut().
I am having problems programatically trying to highlight the element that I want to copy.
So far, I have tried using the exampe from the FDKRef:
        //grab the selected element and set it to the elementRange
        er = F_ApiGetElementRange(FV_SessionId, docId, FP_ElementSelection);
        parentId = F_ApiGetId(docId, er.beg.childId, FP_ParentElement);
        er.end.parentId = er.beg.parentId = F_ApiGetId(docId, parentId, FP_ParentElement);
        // if the selected element is a child of the highest level element, the client returns here
        if(!er.end.parentId) return;
        er.beg.childId = parentId;
        er.beg.offset = er.end.offset = 0;
        er.end.childId = F_ApiGetId(docId, parentId, FP_NextSiblingElement);
        F_ApiSetElementRange(0, docId, FP_ElementSelection, &er);
        F_ApiCut(docId, 0);
but this only grabs an element that is already selected. Is there a way to select an element through the API?
Thanks for any help!

TrainingDeveloper,
There most certainly is a way. You can set up any kind of selection that you want, although it is definately a tricky process that can throw off even an experienced FDK developer. Here are my observations based on the code you pasted...
If you want to select an element, the first thing is that you need to have the ID of that element. I don't see anywhere in your code where an element ID is retrieved. All I see is the F_ApiGetElementRange which is getting the current selection, which in turn is likely why you just keep cutting the currently-selected element. If you want to get a specific element, that function call is not applicable. You only need to set up the element range structure to reflect the proper selection and then cut.
With that, assume that "elemId" is the ID of the element you want to cut. To select an entire element, you would do this:
F_ObjHandleT elemId, docId;
F_ElementRangeT er;
/* . . .   code here to get elemId, docId, etc. . . .  */
//set up the element range structure for whole-element selection
er.beg.childId = elemId;
er.beg.parentId = er.end.parentId =  F_ApiGetId(docId, elemId, FP_ParentElement);
er.end.childId = F_ApiGetId(docId, elemId,  FP_NextSiblingElement);
er.beg.offset = er.end.offset =  0;
//set the element selection in preparation for the cut
F_ApiSetElementRange(FV_SessionId, docId,  FP_ElementSelection, &er);
//... and cut
F_ApiCut(docId, 0);
I'm not sure what the sample you pasted is meant to accomplish. It is somewhere along the right track but it won't get you exactly what you want.
Now, I should say that the process of retrieving the desired element ID is a whole different challenge. I'm not sure if you know how to do that or not so I'll defer any discussion on that until you ask.
Russ

Similar Messages

  • How can i highlight text in the Adobe Difital Editions?

    How can i highlight text in the Adobe Difital Editions?

    You have to remember that Digital Editions was never designed to have 'text
    editor' capabilities.  BTW: Bluefire and Overdrive also have such
    limitations.  Put in another frame of reference, DE presents you with the
    ebook, as you would be presented with a physical printed book.
    ==============

  • How do I highlight text in the new Pages?  It's not clear.

    I have the new version of Pages.  And it appears that highlighting of text is an issue.  This is a basic function.
    I found there is one quick key version, but doesn't clearly explain how to change highlighting colours.  How to get into it.
    I have to explain this to my 80 year old mom, who we told to get a Mac because it was easier!
    So if anyone has it laid out step 1, 2, 3, that would be helpful, because it's not clear to me either.
    Thanks!
    Apple - please to a quick fix for this one, it should be the same as changing the size or the font or like bold or italic.  Simple, clear, fast and doable..... for anyone!

    TO Peter,
    Thanks for the list. I had found it in LibreOffice, tucked away in the Background tab of the Character pane opened by the Character... menu item in the Format menu, and named "Background Color. A few steps further down than in Pages. Apache OpenOffice has it in the same place. But both also have a hilight icon in the toolbar.
    I didn't fin highlighting or Color fill in Text Edit (v1.8). Might need a further search.
    But this well-equipped party of (one) oscurantist did find a shorter path to highlighting text in Pages '09, cleverly hidden in plain view! See the image below.
    TO hscortez,
    I'm aware that changing the text colour is not highlighting.
    But YeOldMacFan pointed out how to change text colour AND how to change background colour of text, using Character fill, found in the Advanced Options (Pages 5) or the More (Pages '09) tab of the Text Inspector.
    Character Fill fills the space around the character with the chosen colour. As shown above, it's essentially the same effect as dragging a hiliter pen along a line of printed text.
    Unfortunately, whats shown above is the Character fill well on the format bar of Pages '09—right out in the open like the highlighter pen button in LibreOffice, and presumeably in MS Word. I don't have Pages 5 (avoiding it until a few more of the missing features arrive), but I do note that Pages for iOS offers highlight as one of the options in the contextual menu that appears when a block of text is selcted.
    The process appears to be:
    tap twice to select some text.
    drag the handles at each end of the selection to adjust what's selected.
    tap Highlight in the menu that has appeared on the screen.
    One thing missing appears to be colour choice. The default is a 'hiliter yellow'. I didn't see a way to select a different colour.
    "Hopefully, this will make it on their upgrade list. "
    Hope is good, but taking action is useful.
    Pages menu > Provide Pages Feedback > Make your request that this be added to Pages 5. Requests made through Provide ...Feedback go directly to Apple. Comments and questions here are read by users like yourself, and we don't have the ability to change the way the apps work. Not directly,anyway.
    Regards,
    Barry

  • How to create clean text for the web in Photoshop/Illustrator

    I am puzzled to death on how in the world to get clean text for the web in Photoshop/Illustrator, particularly white text. I want my text to turn out exactly like the text at this website: thepainteddoor.org
    If you scroll down to the bottom of that page, notice the titles "Featured Media", "Social Networking", and "Contact Information". They are all .gif images. I have tried to replicate what these images look like for about 3 hours now to no avail. Can anyone tell me how to do this? It just looks like a simple outline or drop shadow, but I can't get it to show up like that. If someone could help me replicate that effect with text (aka make it show up clean as an image), I would graciously give them money through PayPal*.
    * = I will only give cash if it will replicate it exactly (and I mean exactly)..and it won't be too much..I'm a poor college student. :-P
    Thanks in advance!
    Thomas

    You would do it the way I created it:
    Select the Text tool in Photoshop and set the font and parameters as I have listed.  Then enter whatever text you like.  It will be rendered over the top of the lower layers you may have in the document.  Save as an image of the appropriate type and you're there.
    Note that "lower layers you may have in the document" could conceivably be none at all (i.e., you render the text over a transparent document).  You could imagine saving that as a .png with transparency and get light text in an image that could then be put over the top of anything else.  The alpha mixing will see to it that the edges smoothly blend with the background.  I haven't actually tried this (I usually do try my own suggestions) because of lack of time right now.
    -Noel
    Edit:  Markerline and I seem to be on the same crystal-controlled wavelength. 

  • How to create a portlet through the hosted portal service?

    Hi!
    I'm currently working with Release 2, Portal Version 9.0.2.2.14.
    I read that it is possible to create a portlet (eg. survey portlet) through the hosted portal serviced (portal.oracle.com). How can I do this?

    The easiest way to provide search on just pages (not content areas) would be to crawl portal pages just like static pages. We have search partners on http://portalcatalog.oracle.com/ that can help you w/ this.

  • How to create a text editor, the one like header text in PO

    Dear Ones,
    My requirement is that I want to create a text editor for storing terms and condition plant wise.
    The editor should be the one like header text in PO. It can take end number of lines.
    I created the text object ('TERMS') in table ttxob and text for it in table ttxot.
    Also created text id ('L000' and 'L001') in table ttxid and text for it in table ttxit.
    Now using FM read_text, save_text and edit_text, I have written a program but it does not save the data.
    When I run the program initially it displays me blank, then I enter some data into it. Again when I come back it displays the data and also saves the edition. But if I close my session the data is gone.
    It means it is not actually saving the data in database. My code is as below:
    *& Report ZAK_TEXT_EDITOR
    REPORT zak_text_editor.
    DATA : head TYPE STANDARD TABLE OF thead WITH HEADER LINE,
           line TYPE STANDARD TABLE OF tline WITH HEADER LINE.
    DATA : tdname TYPE thead-tdname.
    SELECTION-SCREEN : BEGIN OF BLOCK blk WITH FRAME TITLE text-001.
    SELECTION-SCREEN : SKIP 1.
    PARAMETERS       : id TYPE thead-tdid OBLIGATORY
                               MATCHCODE OBJECT zak_textid.
    SELECTION-SCREEN : SKIP 1.
    SELECTION-SCREEN : END OF BLOCK blk.
    START-OF-SELECTION.
      CONCATENATE 'TERMS' id INTO tdname.
      head-tdobject   = 'TERMS'.
      head-tdname     = tdname.
      head-tdid       = id.
      head-tdspras    = sy-langu.
      head-tdlinesize = 132.
      APPEND head.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                        = sy-mandt
          id                            = id
          language                      = sy-langu
          name                          = tdname
          object                        = 'TERMS'
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
        TABLES
          lines                         = line
       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.
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            client                = sy-mandt
            header                = head
          INSERT                = ' '
          SAVEMODE_DIRECT       = ' '
          OWNER_SPECIFIED       = ' '
          LOCAL_CAT             = ' '
        IMPORTING
          FUNCTION              =
          NEWHEADER             =
          TABLES
            lines                 = line
         EXCEPTIONS
           id                    = 1
           language              = 2
           name                  = 3
           object                = 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.
      ENDIF.
      CALL FUNCTION 'EDIT_TEXT'
        EXPORTING
        DISPLAY             = ' '
        EDITOR_TITLE        = ' '
          header              = head
        PAGE                = ' '
        WINDOW              = ' '
          save                = 'X'
        LINE_EDITOR         = ' '
        CONTROL             = ' '
        PROGRAM             = ' '
        LOCAL_CAT           = ' '
      IMPORTING
        FUNCTION            =
        NEWHEADER           =
        RESULT              =
        TABLES
          lines               = line
       EXCEPTIONS
         id                  = 1
         language            = 2
         linesize            = 3
         name                = 4
         object              = 5
         textformat          = 6
         communication       = 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.

    CONSTANTS:
      line_length TYPE i VALUE 254.
    DATA: ok_code LIKE sy-ucomm.
    DATA:
    Create reference to the custom container
      custom_container TYPE REF TO cl_gui_custom_container,
    Create reference to the TextEdit control
      editor TYPE REF TO cl_gui_textedit,
      repid LIKE sy-repid.
    START-OF-SELECTION.
      SET SCREEN '100'.
          MODULE USER_COMMAND_0100 INPUT                                *
    MODULE user_command_0100 INPUT.
    CASE ok_code.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
    The TextEdit control should only be initialized the first time the
    PBO module executes
      IF editor IS INITIAL.
        repid = sy-repid.
      Create obejct for custom container
        CREATE OBJECT custom_container
          EXPORTING
            container_name              = 'MYCONTAINER1'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            others                      = 6
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      Create obejct for the TextEditor control
        CREATE OBJECT editor
          EXPORTING
             wordwrap_mode          =
                    cl_gui_textedit=>wordwrap_at_fixed_position
             wordwrap_position      = line_length
             wordwrap_to_linebreak_mode = cl_gui_textedit=>true
            parent                  = custom_container
          EXCEPTIONS
            error_cntl_create      = 1
            error_cntl_init        = 2
            error_cntl_link        = 3
            error_dp_create        = 4
            gui_type_not_supported = 5
            others                 = 6
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT

  • Create a user through the API and "Prompt user to change password after next login".

    Using the Adobe Connect Interface, I can create a user and check the checkbox to "Prompt user to change password after next login".
    Can I achieve the same result using the API? The principal-update action doesn't offer such an option and, as far as I can tell, there isn't another action to do so either.
    Thank you.

    You can achieve it as part of your application functionality, but not as a configuration option on WLS.

  • How to create input text of the node in AVL tree

    Hi experts,
    I create a simple AVL tree to display the sales order items, just two classes for one relationship. Like the left part on the screen in this program "DEMO_ABAP_OBJECTS_CONTROLS".
    I want to let the node of the second class be maintained serial no., somthing like input field behind the node or double click the node, then show up the input field on another space on the same screen.
    And there is a button on screen, I can do some check for the text of input field when pressing the button. If the input data is wrong , then show up the error message.
    I have searched BCALV* in SE38, but i don't see anything helpful.
    Plz give me some advice, thanks a lot!!
    Regards,
    Claire

    To Kunjal and Uwe,
    My AVL tree is declared like this:
    Data: tree TYPE REF TO cl_gui_simple_tree.
    The class is not  "cl_gui_alv_tree" , so I can not use the code.
    The code I create the node is the follwing:
    CALL METHOD tree->add_nodes
             EXPORTING table_structure_name = 'ABDEMONODE'
                       node_table = node_table.
    And I looked the program that Uwe wrote, the tree is declared in class cl_gui_alv_tree, too.
    I want to double click the node and appear a field that can be inputed text.
    Is there any other way to do this with the class cl_gui_simple_tree?
    Thanks for the advence help.
    Claire

  • How Do highlight text in the body of an email message in Mac Mail?

    Can anyone tell if IF and HOW I can highlight text in the body of an email message using Mac Mail (in Yosemite).  I do NOT mean MARKUP an attachment.  I want to highlight a word or phrase in the body of my email message.  I know I can change the font color, but can't seem to add a highlight!  Thanks!

    Hi,
    is is possible, - link is below. Works on Yosemite, btw.
    http://www.mihalick.us/how-to-highlight-text-in-yellow-using-apple-mail/

  • How to create a text file or XML file  and add content through  code into it...

    Hi Everyone,
    How to create a text file and add content through the code to the text file eform javascript ......orelse can we create a text file in life cycle designer...
    Else say how to create a new XML file through the code and how some content like Example "Hello World".

    You can create a text file as a file attachment (data object) using the doc.createDataObject and doc.setDataObjectContents:
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.450.html
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.528.html
    You can then export the file with the doc.exportDataObject method:
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.463.html
    This won't work with Reader if it hasn't been given the file attachment usage right with LiveCycle Reader Extensions.

  • How to highlight text in the iCloud web app

    Hi,
    My computer recently broke so I had to use my mom's windows computer to do my homework. I had to use the iCloud web app Pages to do my homework. My assignment requires to be able to highlight stuff so does anyone know how to highlight text in the iCloud web apps?

    You can do this easily by using a "modify class" parameter in your web template.
    Following methods are of your interest to change char/KF headers.
    CAPTION_CELL          changes formats/values of characteristic headers
    STRUCTURE_CELL          changes formats/values of key figure headers
    Hope it helps.
    Hari Immadi
    http://immadi.com
    SEM BW Analyst

  • How can I highlight text in iPages with a 'virtual' fluorescent marker

    How can I highlight text in iPages with a virtual fluorescent marker?

    The text highlight option is the little box on the toolbar with the "a" and a diagonal line through it (That is the default transparent highlight option).
    Peter

  • How to Create header text in Quotations?

    Helli Experts,
    Can anybody of you tell me how to create Header text for Quotations in SD?
    I want to fetch it into Layout Set. I want to hardcode it.
    Harish

    Hi,
    Use the SAVE_TEXT and READ_TEXT Function module to create a header text through program.
    Prabhudas

  • Linked Calls through the API

    Hi all,
    We are currently working on a web form that we want to have create a number of calls. Ideally we`d like a parent call and a couple of linked calls which would be created from the form through the API.
    Looking at the doco, it seems you should be able to use the 'aCustomParameters’ field to achieve this. However, I`ve just seen KB 2010464 which seems to indicate that it may not be quite as simle as this (in 9.0 anyway).
    Just wondering if anyone has actually done this.
    We're currently on 9.1.5.
    Cheers,
    Ray

    Hi Ray,
    I am really not sure what this KB article is refering to but you souldn't blindly rely on every sentence has been written. Even in the knowledge base. Especially when VMware had never paid much attention to this product, unfortunately.
    In my opinion (you should take it with caution as well) you have different options to link calls through API:
    * Using CallUpdate transaction
    * Using ExecuteQueryAction transaction with a standard query "UPDATE CALL LINK"
    * Using ExecuteQueryAction transaction with your custom query (I guess that KB article is suggesting to use this particular method when referencing professional services help.)
    Take in account that it's very important to supply required parameters (yes, as aCustomParameters) when using the first or the second option:
    1. When updating a Child Call:
    PARENT_CHILD = "C"
    LINKED_CALL_NO = [PARENT_CALL_NUMBER]
    UPDATE_LINKED_CALL_NO = [PARENT_CALL_NUMBER]
    2. When updating a Parent Call:
    PARENT_CHILD = "P"
    That's it. Looks quite simple but... you have to be very careful when doing this - many related things should be checked or considered along with linking: are both calls not locked, how impact value should be recalculated and changed accordingly, how to update calls history to reflect the linking event, security check through partitions and system roles settings and maybe many others. I believe this is one of key reasons why KB is suggesting to request professional services to create a solution for Calls linking through API.
    Still if you will decide to try and you will come across with any question, please don't hesitate to ask.
    Regs, Gytis

  • How 2 creat report for displaying the details of a Delivery Document using

    how to create report for displaying the details of a Delivery Document using the tables LIKP, LIPS
    thank you
    regards,
    jagrut bharatkumar shukla
    points will be rewarded

    HI
    I AM GIVING YOU MY DELIVERY DOCUMENT CODE...MODIFY IT ACCORDING TO YOUR REQUIREMENT
    *& Report  ZDELIVERY                                *
    report  zdelivery  message-id z9bhu          .
    types: begin of t_likp,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
    *           LFDAT TYPE LIKP-LFDAT,      "Delevery Date
    *           WAERK TYPE LIKP-WAERK,      "Currency
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
           end of t_likp.
    types: begin of t_lips,
               vbeln type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,
    *           MEINS TYPE LIPS-MEINS,      "Base Unit of Measure
               vgbel type lips-vgbel,      "Doc no of the reference document
            end of t_lips.
    types: begin of t_vbpa,
               vbeln type vbpa-vbeln,      "SD DocumenT Number
               posnr type vbpa-posnr,      "Item number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,      "Customer Number 1
           end of t_vbpa.
    types: begin of t_kna1,
               kunnr type kna1-kunnr,      "Customer Number 1
               name1 type kna1-name1,      "Name 1
               ort01 type kna1-ort01,      "City
               adrnr type kna1-adrnr,      "Address
           end of t_kna1.
    types: begin of t_li_vbpa,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
    *           LFDAT TYPE LIKP-LFDAT,      "Delevery Date
    *           WAERK TYPE LIKP-WAERK,      "Currency
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
               vbeln1 type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,      "Net Price
    *           MEINS TYPE LIPS-MEINS,      "Base Unit of Measure
               vgbel type lips-vgbel,      "Doc no of the reference document
               vbeln3 type vbpa-vbeln,     "SD DocumenT Number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,      "Customer Number 1
           end of t_li_vbpa.
    types: begin of t_final,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
               vbeln1 type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,      "Net Price
               vgbel type lips-vgbel,      "Doc no of the reference document
               vbeln3 type vbpa-vbeln,     "SD DocumenT Number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,     "Customer Number 1
               name1 type kna1-name1,      "Name 1
               ort01 type kna1-ort01,      "City
               adrnr1 type kna1-adrnr,     "Address
               name2 type kna1-name1,      "Name 1
               ort02 type kna1-ort01,      "City
               adrnr2 type kna1-adrnr,     "Address
               name3 type kna1-name1,      "Name 1
               ort03 type kna1-ort01,      "City
               adrnr3 type kna1-adrnr,     "Address
           end of t_final.
    *            D A T A  D E C L A R A T I O N
    *&*********Internal Table Declaration****************&*
    data: it_likp type standard table of t_likp.
    data: it_lips type standard table of t_lips.
    data: it_vbpa type standard table of t_vbpa.
    data: it_kna1 type standard table of t_kna1.
    data: it_li_vbpa type standard table of t_li_vbpa.
    data: it_li_vbpa_temp type standard table of t_li_vbpa.
    data: it_final type standard table of t_final.
    *&*********Work Area Declaration********************&*
    data: wa_likp type t_likp.
    data: wa_lips type t_lips.
    data: wa_vbpa type t_vbpa.
    data: wa_kna1 type t_kna1.
    data: wa_li_vbpa type t_li_vbpa.
    data: wa_li_vbpa_temp type t_li_vbpa.
    data: wa_final type t_final.
    *&*********Data Declaration************************&*
    data: d_vbeln type likp-vbeln.
    data: flag type i value 0.
    *           S E L E C T I O N  S C R E E N   D E C L A R A T I O N
    selection-screen begin of block block2 with frame title text-001.
    select-options: s_vbeln for d_vbeln obligatory.    "Delivery no
    selection-screen end of block block2.
    *            A T  S E L E C T I O N - S C R E E N   E V E N T S
    *AT SELECTION-SCREEN.
    *PERFORM VALIDATE_DATA.
    *            S T A R T   O F  S E L E C T I O N     E V E N T S
    start-of-selection.
    perform fetch_data.
    perform merge_data_kna1.
    *INCLUDE Z9BT_SH_***4_FORMS.
    call function 'OPEN_FORM'
    exporting
    *   APPLICATION                       = 'TX'
    *   ARCHIVE_INDEX                     =
    *   ARCHIVE_PARAMS                    =
        device                            = 'PRINTER'
    *   DIALOG                            = 'X'
    *   FORM                              = ' '
       language                          = sy-langu
    *   OPTIONS                           =
    *   MAIL_SENDER                       =
    *   MAIL_RECIPIENT                    =
    *   MAIL_APPL_OBJECT                  =
    *   RAW_DATA_INTERFACE                = '*'
    *   SPONUMIV                          =
    * IMPORTING
    *   LANGUAGE                          =
    *   NEW_ARCHIVE_PARAMS                =
    *   RESULT                            =
    exceptions
       canceled                          = 1
       device                            = 2
       form                              = 3
       options                           = 4
       unclosed                          = 5
       mail_options                      = 6
       archive_error                     = 7
       invalid_fax_number                = 8
       more_params_needed_in_batch       = 9
       spool_error                       = 10
       codepage                          = 11
       others                            = 12
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    sort it_final by vbeln.
    loop at it_final into wa_final.
    call function 'START_FORM'
    exporting
    *   ARCHIVE_INDEX          =
       form                   = 'Z9BT_DELIVERY'
       language               = sy-langu
    *   STARTPAGE              = ' '
    *   PROGRAM                = ' '
    *   MAIL_APPL_OBJECT       =
    * IMPORTING
    *   LANGUAGE               =
    exceptions
       form                   = 1
       format                 = 2
       unended                = 3
       unopened               = 4
       unused                 = 5
       spool_error            = 6
       codepage               = 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.
    call function 'WRITE_FORM'
    exporting
       element                        = 'ITEM_LIST'
       function                       = 'SET'
       type                           = 'BODY'
       window                         = 'MAIN'
    * IMPORTING
    *   PENDING_LINES                  =
    * EXCEPTIONS
    *   ELEMENT                        = 1
    *   FUNCTION                       = 2
    *   TYPE                           = 3
    *   UNOPENED                       = 4
    *   UNSTARTED                      = 5
    *   WINDOW                         = 6
    *   BAD_PAGEFORMAT_FOR_PRINT       = 7
    *   SPOOL_ERROR                    = 8
    *   CODEPAGE                       = 9
    *   OTHERS                         = 10
    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 'END_FORM'
    * IMPORTING
    *   RESULT                         =
    exceptions
       unopened                       = 1
       bad_pageformat_for_print       = 2
       spool_error                    = 3
       codepage                       = 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.
    endloop.
    call function 'CLOSE_FORM'
    * IMPORTING
    *   RESULT                         =
    *   RDI_RESULT                     =
    * TABLES
    *   OTFDATA                        =
    exceptions
       unopened                       = 1
       bad_pageformat_for_print       = 2
       send_error                     = 3
       spool_error                    = 4
       codepage                       = 5
       others                         = 6
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    *&      Form  VALIDATE_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form validate_data .
    select single vbeln into wa_likp-vbeln
                        from likp where vbeln in s_vbeln.
    append wa_likp to it_likp.
    if sy-subrc <> 0.
    flag = 1.
    endif.
    endform.                    " VALIDATE_DATA
    *&      Form  FETCH_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form fetch_data .
    select a~vbeln
           a~erdat
           a~kunnr
           a~kunag
           a~traty
           b~vbeln
           b~posnr
           b~matnr
           b~arktx
           b~lfimg
           b~netpr
           b~vgbel
           c~vbeln
           c~parvw
           c~kunnr
             into table it_li_vbpa
                    from likp as a
                    left outer join lips as b on a~vbeln = b~vbeln
                    inner join vbpa as c on b~vgbel = c~vbeln
                    where a~vbeln in s_vbeln and
                    c~parvw = 'RE'.
    endform.                    " FETCH_DATA
    *&      Form  MERGE_DATA_KNA1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form merge_data_kna1 .
    if it_li_vbpa[] is not initial.
    it_li_vbpa_temp[] = it_li_vbpa[].
    sort it_li_vbpa_temp by kunnr.
    delete adjacent duplicates from it_li_vbpa_temp comparing kunnr.
    loop at it_li_vbpa into wa_li_vbpa.
    read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
    wa_li_vbpa-kunag.
    if sy-subrc <> 0.
    wa_li_vbpa_temp = wa_li_vbpa.
    append wa_li_vbpa_temp to it_li_vbpa_temp.
    endif.
    read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
    wa_li_vbpa-kunnrb.
    if sy-subrc <> 0.
    wa_li_vbpa_temp = wa_li_vbpa.
    append wa_li_vbpa_temp to it_li_vbpa_temp.
    endif.
    endloop.
    endif.
    if it_li_vbpa_temp[] is not initial.
    select  kunnr
            name1
            ort01
            adrnr into table it_kna1 from kna1
                        for all entries in it_li_vbpa_temp
                        where kunnr = it_li_vbpa_temp-kunnr.
    endif.
    loop at it_li_vbpa into wa_li_vbpa .
    wa_final-vbeln = wa_li_vbpa-vbeln.
    wa_final-erdat = wa_li_vbpa-erdat.
    *it_final-LFART = it_li_vbpa-LFART.
    wa_final-kunnr = wa_li_vbpa-kunnr.
    wa_final-kunag = wa_li_vbpa-kunag.
    *it_final-VSTEL = it_li_vbpa-VSTEL.
    wa_final-traty = wa_li_vbpa-traty.
    wa_final-vbeln1 = wa_li_vbpa-vbeln.
    wa_final-posnr = wa_li_vbpa-posnr.
    wa_final-matnr = wa_li_vbpa-matnr.
    wa_final-arktx = wa_li_vbpa-arktx.
    wa_final-lfimg = wa_li_vbpa-lfimg.
    wa_final-netpr = wa_li_vbpa-netpr.
    *wa_final-GEWEI = it_li_vbpa-GEWEI.
    *it_final-VOLUM = it_li_vbpa-VOLUM.
    *it_final-VOLEH = it_li_vbpa-VOLEH.
    wa_final-vgbel = wa_li_vbpa-vgbel.
    wa_final-vbeln3 = wa_li_vbpa-vbeln.
    *wa_final-PARVW = wa_li_vbpa-PARVW.
    wa_final-kunnrb = wa_li_vbpa-kunnrb.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnr.
    if sy-subrc = 0.
    wa_final-name1 = wa_kna1-name1.
    wa_final-ort01 = wa_kna1-ort01.
    wa_final-adrnr1 = wa_kna1-adrnr.
    endif.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunag.
    if sy-subrc = 0.
    wa_final-name2 = wa_kna1-name1.
    wa_final-ort02 = wa_kna1-ort01.
    wa_final-adrnr2 = wa_kna1-adrnr.
    endif.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnrb.
    if sy-subrc = 0.
    wa_final-name3 = wa_kna1-name1.
    wa_final-ort03 = wa_kna1-ort01.
    wa_final-adrnr3 = wa_kna1-adrnr.
    endif.
    append wa_final to it_final.
    clear wa_final.
    endloop.
    endform.

Maybe you are looking for

  • Binary Values unreadable - Database corrupt?

    Hi, I'm experiencing a really weird problem here, I have a table with some varchar columns and two binary columns. What I do now, is to select data from it via Python with the following select statement: select * from torder where customerid=1624 ord

  • Flash CS4 I'm trying to fade a photo and can't get alpha to work

    I installed Flash CS4 and the alpha doesn't seem to work. I follow all the instructions to the letter but get no results. I had no problems working in Flash MX

  • Error Message "Form - Modal form is currently active"

    This error message appears when our Add-on is connecting and I have the Add-on Administration form open.  Are there any suggestions on what can be causing this error message and how to prevent the error message from appearing?

  • I keep having a recurring kernel panic. How do I fix this? [LOG]

    Interval Since Last Panic Report:  111076 sec Panics Since Last Report:          4 Anonymous UUID:                    D59CE72A-BDC4-4F39-83D7-68903CC63D43 Thu Aug  1 21:54:25 2013 panic(cpu 2 caller 0xffffff80002d1208): Kernel trap at 0xffffff7f810ce

  • Impossible de lancer Logic Express 9 sous MAC OS X 10.7.4

    J'ai installé LOGIC EXPRESS 9 sous Mac OS X Lion 10.7.4 (11E53) mais lorsque je lance le logiciel, un message d'erreur s'affiche " impossible d'ouvrir cette version de l'application Logic express avec cette version de Mac OS X"..dois-je mettre à jour