XML Element of selected text

Hi,
I need to get the tag name of bold applied in InDesign document.  When finding bold contents in InDesign document using Find Options, its select bold contents with some hidden text (tags) as shown in the below image.  If i use "select in structure" of selected text, its select wrong element (parent of all selected elements).  I need to get the correct XML Element of selected text (Except hidden character).  How can i get the element of selected text??
Can anyone help me.
- Sudha K

Hi,
I need to get the tag name of bold applied in InDesign document.  When finding bold contents in InDesign document using Find Options, its select bold contents with some hidden text (tags) as shown in the below image.  If i use "select in structure" of selected text, its select wrong element (parent of all selected elements).  I need to get the correct XML Element of selected text (Except hidden character).  How can i get the element of selected text??
Can anyone help me.
- Sudha K

Similar Messages

  • [CS3][JS] Apply XML tag for selected text

    Hi
      I need to apply XML tag to selected text in a tagged content.The XML tag is already applied for paragraph.I need to apply XML Tag for selected text in a paragraph.
    I have used following code, it applies tag for entire paragraph,not a selected text in a paragraph.
    app.selection[0].associatedXMLElements[0].markupTag=myDoc.xmlTags.item("italic");
    Please suggest me.
    Regards
    kumar

    The example script, markup.jsx
    //Markup.jsx
    //An InDesign CS4 JavaScript
    //Shows how to use the markup method.
    main();
    function main(){
        mySetup();
        mySnippet();
        myTeardown();
    function mySetup(){
        var myDocument = app.documents.add();
        var myPage = app.activeWindow.activePage;
        var myRootXMLElement = myDocument.xmlElements.item(0);
        var myXMLTag = myDocument.xmlTags.add("xml_element");
        var myXMLElementA = myRootXMLElement.xmlElements.add(myXMLTag);
        myXMLElementA.contents = "This is a paragraph in an XML story.";
        var myTextFrame = myPage.textFrames.add({geometricBounds:myGetBounds(myDocument, myPage)});
        myTextFrame.contents = "This is the first paragraph in a text frame.\rThis is the second paragraph in a text frame.\rThis is the third paragraph in a text frame.\rThis is the fourth paragraph in a text frame.\r";
    function mySnippet(){
        //<fragment>
        var myDocument = app.documents.item(0);
        var myPage = myDocument.pages.item(0);
        myDocument.xmlElements.item(0).xmlElements.item(0).markup(myPage.textFrames.item(0));
        //</fragment>
    function myTeardown(){
    function myGetBounds(myDocument, myPage){
        var myPageWidth = myDocument.documentPreferences.pageWidth;
        var myPageHeight = myDocument.documentPreferences.pageHeight
        if(myPage.side == PageSideOptions.leftHand){
            var myX2 = myPage.marginPreferences.left;
            var myX1 = myPage.marginPreferences.right;
        else{
            var myX1 = myPage.marginPreferences.left;
            var myX2 = myPage.marginPreferences.right;
        var myY1 = myPage.marginPreferences.top;
        var myX2 = myPageWidth - myX2;
        var myY2 = myPageHeight - myPage.marginPreferences.bottom;
        return [myY1, myX1, myY2, myX2];
    I think you can use the markup function on the selected item (Text Object have a markup method)
    Thomas B. Nielsen
    http://www.lund-co.dk

  • Table for text elements and selection texts

    Hi All,
    In which DB table does SAP stores program name and corresponding text-elements and selection texts used in that program.
    There is a table D010TINF which just stores basic information but not the text elements number and name.
    Thanks in advance.
    Regards,
    Atish

    hi,
    table name - RS38M (take se11 and give this, u can confirm)
    field name  - STEXTT
    rgds
    anver
    if hlped pls rwrd points

  • Javascript create parent xml element from selection

    Hello,
    With help from these forums I finally learned how to script creating a parent xml element from a selection in the Structure Pane.
    var myDoc = app.activeDocument;
    var mySel = app.selection;
    var newParent = myDoc.xmlElements[0].xmlElements.add({markupTag:"c_bullet_list"}).move(LocationOptions.before, mySel[0]);
    var i = mySel.length;
    while(i--){
              mySel[i].move(LocationOptions.AT_BEGINNING, newParent);  
    Hope this helps somebody.

    Use placeXML instead of move().
    var myXMLElementA = app.selection[0];
    var myTextFrameA = app.activeDocument.pages[2].textFrames.add({geometricBounds:[0, 0, 160, 160], contents:" "});
    myXMLElementA.placeXML(myTextFrameA);
    Shonky

  • Selecting the content of XML element CS3(JS)

    Hi
    I am trying to select the whole content of XML Element.
    I am trying like this
    app.activeDocument.xmlElements[i].select();
    But it is not working.
    Regards
    Suresh

    A few hints:
    Perhaps your variable
    i i
    is not defined. If that's the case, give up trying to write code for this complicated job! XML is not the easiest part of ID to begin with. Starting with uninitialized variables and flagging that as an error (and complaining about that in a forum) is a beginners' blunder.
    If I run your script line with i set to 0, the first element of my XML structure is selected. I can see with my own eyes it works, because I have the XML Structure pane in ID open. If I click on the 2nd element there and run your script line, the top (= 0th) element is selected. Perhaps you didn't open the XML Structure view so you did not see it worked after all. Or perhaps you expected something
    i else
    to be selected -- the text content, maybe -- so you tag it as "error". That's a misinterpretation of what the XmlElement object is. Understandable, but still not an error. You can have lots of XmlElements without any text or other object associated. If it was your intention to select whatever the xml element contains, try working with the property 'xmlContent'. From its description I gather that sort-of does this alternative interpretation, i.e., you can select the
    i text
    which is pointed to by the element. Untried. But do read on.
    If I run your script with i = 1, I
    i do
    get an error, and it's perfectly valid too! "Object is invalid" -- well, of course it is. There is no other XML element at that level. An app.document.xmlelements entry always points to the
    i root
    of the XML, and you can only have one. Perhaps you expected #1 to be the next sub-element. Well, not so in the ID implementation -- as usual for almost all XML based structures, it's a tree. The "next" element is xmlElements[0].xmlElements[0], which you can check by changing your line to
    >app.activeDocument.xmlElements[0].xmlElements[0].select();
    and verifying the 2nd element from the top is selected in the XML Structure view.

  • SELECT Fails for a WITHIN clause if the xml element have a DASH

    I am using a context index on a CLOB Column and one of my records is like this.
    ?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cid-spf xmlns="java:com.verid.ident">
    <tran-id>1020022445889</tran-id>
    <tran-time>1187984936000</tran-time>
    <mode>3</mode>
    <spoofer>
    <name/>
    <ph>
    <number>12106337000</number>
    </ph>
    </spoofer>
    <spfd>
    <name/>
    <ph>
    <number>13173708869</number>
    </ph>
    </spfd>
    <st-time>1187984936000</st-time>
    <dest-number>12106878012</dest-number>
    </cid-spf>
    When I run a query
    SELECT * FROM identity_event
    WHERE contains (identityeventdata,'1187812924000 WITHIN ST-TIME')>0
    All my other xml elements works just fine.
    I get this error.
    [1]: (Error): ORA-12801: error signaled in parallel query server P003, instance maralpinor03.trogdor.com:maralpin3 (3) ORA-29902: error in executing ODCIIndexStart() routine ORA-20000: Oracle Text error: DRG-50901: text query parser syntax error on line 1, column 24

    The dash or hyphen (-) has special meaning to Oracle text. It means MINUS. Any time that you want Oracle Text to treat such a special character as regular text, you need to escape it, either by putting a backslash (\) in front of each special character or by enclosing a whole word or phrase within curly brackets ({}). Please see the demonstration below.
    SCOTT@10gXE> CREATE TABLE identity_event
      2    (identityeventdata  CLOB)
      3  /
    Table created.
    SCOTT@10gXE> INSERT INTO identity_event VALUES
      2  ('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      3  <cid-spf xmlns="java:com.verid.ident">
      4  <tran-id>1020022445889</tran-id>
      5  <tran-time>1187984936000</tran-time>
      6  <mode>3</mode>
      7  <spoofer>
      8  <name/>
      9  <ph>
    10  <number>12106337000</number>
    11  </ph>
    12  </spoofer>
    13  <spfd>
    14  <name/>
    15  <ph>
    16  <number>13173708869</number>
    17  </ph>
    18  </spfd>
    19  <st-time>1187984936000</st-time>
    20  <dest-number>12106878012</dest-number>
    21  </cid-spf>')
    22  /
    1 row created.
    SCOTT@10gXE> CREATE INDEX your_index ON identity_event (identityeventdata)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS
      4    ('FILTER        CTXSYS.NULL_FILTER
      5        SECTION GROUP CTXSYS.AUTO_SECTION_GROUP')
      6  /
    Index created.
    SCOTT@10gXE> -- wrong:
    SCOTT@10gXE> SELECT * FROM identity_event
      2  WHERE contains (identityeventdata,'1187812924000 WITHIN ST-TIME')>0
      3  /
    SELECT * FROM identity_event
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-50901: text query parser syntax error on line 1, column 24
    SCOTT@10gXE> -- correct:
    SCOTT@10gXE> SELECT * FROM identity_event
      2  WHERE contains (identityeventdata,'1187984936000 WITHIN {ST-TIME}')>0
      3  /
    IDENTITYEVENTDATA
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cid-spf xmlns="java:com.verid.ident">
    <tran-id>1020022445889</tran-id>
    <tran-time>1187984936000</tran-time>
    <mode>3</mode>
    <spoofer>
    <name/>
    <ph>
    <number>12106337000</number>
    </ph>
    </spoofer>
    <spfd>
    <name/>
    <ph>
    <number>13173708869</number>
    </ph>
    </spfd>
    <st-time>1187984936000</st-time>
    <dest-number>12106878012</dest-number>
    </cid-spf>
    SCOTT@10gXE> SELECT * FROM identity_event
      2  WHERE contains (identityeventdata,'1187984936000 WITHIN ST\-TIME')>0
      3  /
    IDENTITYEVENTDATA
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cid-spf xmlns="java:com.verid.ident">
    <tran-id>1020022445889</tran-id>
    <tran-time>1187984936000</tran-time>
    <mode>3</mode>
    <spoofer>
    <name/>
    <ph>
    <number>12106337000</number>
    </ph>
    </spoofer>
    <spfd>
    <name/>
    <ph>
    <number>13173708869</number>
    </ph>
    </spfd>
    <st-time>1187984936000</st-time>
    <dest-number>12106878012</dest-number>
    </cid-spf>
    SCOTT@10gXE>

  • [CS5-5.5][JS] Replace xml element content with user selection

    Hi,
    I'm trying to write a script that replaces xml element content with a user selection.
    I have document containing a textframe with a "root" tag attached. In this frame I have 2 paragraphs, each tagged with a different tag.
    I would like to replace the content of one of the paragraphs with the content of a text selection.
    This piece of code doesn't seem to work:
    myXMLElement.xmlContent = app.selection[0];
    The problem is that almost all properties of the xmlelement (paragraphs, words, etc) are read-only.
    Does anyone have any suggestion?
    Thanx

    It depends on whether you want to maintain formatting. You can use
    myXMLElement.contents = app.selection[0].contents;
    in the (unlikely?) event that you don't mind blowing away the formatting. Otherwise you'll want to use something like:
    myXMLElement.xmlContent.remove();
    app.selection[0].duplicate(LocationOptions.AT_BEGINNING, myXMLElement.xmlContent);
    Jeff

  • Adding text to parentStory destroys XML element / JavaScript, InD CS4

    Dear scripters,
    I'm currently stuck with this problem:
    - I'm writing text to text frames on a layout page
    - while writing some characters/strings are XML tagged (I'm creating an element)
    - I can do this only once, because adding more text after I have created an XML element destroys the link to the element
    Here's my sample:
    var MyBox = app.activeDocument.textFrames.add();
    MyBox.geometricBounds = ["0pt","0pt", "200pt", "200pt"];
    //Fill some content into the text frame
    MyBox.parentStory.contents = "bla";
    //create a xml element for some of the text
    app.activeDocument.xmlElements.item(0).xmlElements.add("test1", MyBox.parentStory.characters.itemByRange(1, 2));
    //so far so good...
    //now some calculating
    var result = "456";
    //add result to the text frame
    //doing this destroys the link to the existing xml element
    MyBox.parentStory.contents += result;
    //doing this creates a new xml element with the wrong characters selected and linked
    app.activeDocument.xmlElements.item(0).xmlElements.add("test2" , MyBox.parentStory.characters.itemByRange(4, 2));
    Can someone please help on?
    Best regards,
    TYPO

    Hello Harbs,
    thank you, it almost works now; the xml element brackets are not destroyed anymore.
    The only problem I have now is that the second element becomes a  child of the first one.
    How can I force each element to  be "independent"?
    Here's the code:
    var MyBox = app.activeDocument.textFrames.add();
    MyBox.geometricBounds = ["0pt","0pt", "200pt", "200pt"];
    var MyContent = "bla";
    MyBox.parentStory.insertionPoints[-1].contents = MyContent;
    MyBox.parentStory.characters.itemByRange(-1, -MyContent.length).select();
    app.activeDocument.xmlElements.item(0).xmlElements.add("test1" ,app.activeDocument.selection[0]);
    MyContent = "456";
    MyBox.parentStory.insertionPoints[-1].contents = MyContent;
    MyBox.parentStory.characters.itemByRange(-1, -MyContent.length).select();
    app.activeDocument.xmlElements.item(0).xmlElements.add("test2" ,app.activeDocument.selection[0]);
    Best regards,
    TYPO

  • How to map more than one xml element with some Paragraph in a Text Frame

    Hi friends,
    I am new in InDesign Java Scripting and I have to place or map, more than one xml elements of different parents, into one textbox. Is it possible through JavaScript? Can anyone help me in this because I have no idea how it should work and it urgently required.
    Thanks in Advance

    I had answered to you already in your first post: the short answer is that it's not possible on the same text box unless you assign a common ancestor of these two "parents" item. That's not a question of scripting, it's the way Indesign handle the XML with the layout. Import a xml in Indesign and drop tags to page item. What you can do manually is quite representative of what can be done through scripting.
    If you assign this anscestor to the text frame, you have to expect that all text child items will be displayed in the text frame (including the text of all the child of the two "parents" and all the other parents/childs that could be under the common ancestor). Having a XML that is designed for Indesign usage is pretty much inevitable if you are doing anything "serious".

  • Generate xml element from Union of 2 Select queries

    Do you know ho I can get the union result of 2 queries and put them in xml result, but I want each query to be in seperate xml element.
    I don t want to put 1 single xmlelement and do a From then construct a virtual table uniting the 2 subqueries
    I mean I don t want something like the following:
    (Select
    XMLAGG(
    XMLELEMENT("credit",
    XMLForest(field1 "detail")
    FROM
    --SubQuery1
    Select field1 from myTable1
    union
    --SubQuery1
    Select field1 from myTable2
    ) "credits"
    I want something like here:
    XMLELEMENT("credits",
    (SELECT
    XMLAGG(
    XMLELEMENT("credit",
    XMLForest(field1 "field1")
    FROM
    myTable1
    (SELECT
    XMLAGG(
    XMLELEMENT("credit",
    XMLForest(field1 "field1")
    FROM
    myTable2
    Except the 2nd alternative is not working Sad
    I get error message:
    "SQL command not properly ended"
    Thanks a lot

    try
    SELECT XMLElement("file",
                      XMLForest( -- File details
                                FILETABLE.ID_FILE "fileNumber",
                                FILETABLE.ID_PRET_CLT "loanID"), -- new
                                -- Debits are pulled from both myTable1 and myTable2 tables
                                -- First: fetching debits from myTable1 table
                                (Select XMLELEMENT("debits",
                                                   (SELECT XMLAGG(XMLELEMENT("debit",
                                                                             XMLELEMENT("referenceNumber",
                                                                                        NUM_REFERENCE)))
                                                      FROM myTable1
                                                     Where ID_FILE =
                                                           FILETABLE.ID_FILE),
                                                   -- Second: fetching debits from myTable2 table
                                                   (SELECT XMLAGG(XMLELEMENT("debit",
                                                                             XMLELEMENT("referenceNumber",
                                                                                        NUM_REFERENCE)))
                                                      FROM myTable2
                                                     Where ID_FILE =
                                                           FILETABLE.ID_FILE))
                                   from dual) /*as XXXX)*/) xml
      FROM FILETABLE

  • How to insert Text physically to xml in xml Element

    hello friends,
    I am newb of jDom. i am trying to change xml "Element's"--->"Text". My xml is as follows .....
    <?xml version ="1.0">
    <Elements>
             <code>
                       <data>EE550</data>
             </code>
    </Elements> I am trying to replace that "<data>" by <data>AA550</data>
    my code is as below
                 SAXBuilder sb = new SAXBuilder();
                 Document doc = sb.build(new File("src/xml/M90EE.xml"));
                 Element element = doc.getRootElement();
                 List children = element.getChildren();
                 String key = (element.getChild("text").getChild("mkey").setText("AA550").getTextTrim());   System.out.println("mkey       :"+key);
    output:
    mkey   :AA550 but is it possible to change in the xml file phisically.
    thanQ
    Ajay

    hello Reegz,
    ThanQ so much for perfect solution....
    when i do like that it is actually adding text to the existing Element Text.. so i wrote as follows....
    SAXBuilder sb = new SAXBuilder();
    Document doc = sb.build(new File("src/xml/M90EE.xml"));
    *String skey = (element.getChild("text").getChild("mkey").removeContent().toString());*     //--------->step 1
    *String skey1 = (element.getChild("text").getChild("mkey").addContent("ISO9001").toString());* //-------->step 2     
    String rdmkey = (element.getChild("text").getChild("mkey").getTextTrim());
    XMLOutputter serializer = new XMLOutputter();
    String str = serializer.outputString(doc);
    FileWriter fr = new FileWriter("src/xml/M90EE.xml");
    fr.write(str);
    fr.flush();
    fr.close();Is there any other way to replace text in step1 and step2 other than above or will it be enough for multiuser programming. Because this application will be accessed by so many number of user's what do u sujjest.
    thanQ ...
    Han.

  • XML element to wanted position in content text?

    Hi,
    I am using java's XML document builder (javax.xml.parsers.*)....
    is it possible to create XML element to wanted position in content text, such as:
    <mycontent>
    Here comes text <AndHereIsElementInWantedPosition ... /> and the normal text does continue.
    Here comes text (2) <AndHereIsElementInWantedPosition ... /> and the normal text (2) does continue.
    </mycontent>
    I see only Element::appendChild(), and Element::setTextContent() functions, but it seems it's not possible with those functions.
    and if it's possible, what functions I should use to read Elements & their position from content text? (Node class doesn't tell the position).

    is it possible to create XML element to wanted position in content textYes. Text is just another kind of node. You can interleave Elements with Text nodes. The Elements aren't 'inside' the text, they are beside it, as sibling nodes.
    I see only Element::appendChild(), and Element::setTextContent() functions, but it seems it's not possible with those functions.Should be. Just append children, Text nodes or Elements.
    and if it's possible, what functions I should use to read Elements & their position from content text?You don't. You read the child nodes from the parent element. Some of them will be Text nodes, some of them will be Elements.

  • Scripting Selective XML into a Single Text Frame? (& Some Other Stuff...)

    Hi all, I could use some help (using version CS5.5).
    I want to import (via Javascript) an XML file similar to this:
    <movieRoot>
         <dvds>
              <movie>
                   <title>2001: A Space Odyssey</title>
                   <edition>Special Edition</edition>
                   <features>NOTHING</features>
                   <notes/>
              </movie>
              <movie>
                   <title>Airplane!</title>
                   <edition />
                   <features>Extra Laughs</features>
                   <notes/>
              </movie>
         </dvds>
    </movieRoot>
    I've been able to successfully do this, so no problem there.
    Then I want to dump the child elements under the XML element "<dvds>" into a single text frame that spans 2 columns per page. That's easy enough too, except:
    1) I want to filter the data so that empty elements or whose contents equal "NOTHING" do not appear.
    2) I want to add static text title above some of the elements that remain (outside the XML proper).
    3) Then I want to format the text (using Paragraph Styles).
    Tall order, I know, but I'm keen on figuring it out. I initially created a document using placeholders and used the standard XML Import to populate it with data, which was filtered using scripts to remove extraneous placeholders and static text. It gave me the result I wanted, but as the XML will be regularly updated and since the "filtered" tags result in non-standard XML entries, it means starting over from scratch after every XML update. So I turned to scripting...
    For point #1, I was able to filter properly using a recursive IF statement, tested here using message alerts:
    I've included a bunch of variables for (hopefully) easier viewing.
    var myXMLRoot = myDocument.xmlElements.item(0);  //movieRoot
    var myXMLParent = myXMLRoot.xmlElements.item(0);  //dvds
    var myXMLElement = myXMLParent.xmlElements.item(0);  //movie
    var currElement = myXMLElement.xmlElements.item(0);  //title
    for (i = 0; i < myXMLParent.xmlElements.length; i++)
        myXMLElement = myXMLParent.xmlElements.item(i);
        for (j = 0; j < myXMLElement.xmlElements.length; j++)
            currElement = myXMLElement.xmlElements.item(j);
            if (currElement.contents != "" && currElement.contents != "NOTHING")
                alert (currElement.markupTag.name + ": " + currElement.contents);
    It worked great until I tried to get it into an existing text frame. Since I want all the info in one text frame, placexml was out of the question, and markup worked but overwrote XML tags -- such as assigning the entire text frame to <movie/title> when I wanted it assigned to <dvds> with <movie/title> tags nested within it.
    If you can help me with anything, this is really where I need pointed in the right direction most. But if you're feeling generous or bored...
    Then for points #2 and #3, I want to take what's left ("filtered" XML data) and add additional text and formatting wherever certain tags are found.
    For example, applying the paragraph style "MovieTitles" for any text within <title></title> XML tags; or adding the phrase "Special Features" (with paragraph style "Headers") above any text marked with <features> tags, while the content within those <features> tags applies the paragraph style "NormalText."
    I've got some of this worked out in pieces already, but it generally falls apart because I can't get the tag structure correct in the text frame. I can provide more info as requested. Any help would be mighty appreciated!
    UPDATE: Surprisingly, I've actually had some good success this evening on solving most of these problems. I'll post my results once I've finished up just in case anyone else can be helped by what I've learned.
    One question remains for the moment: I've inserted text within an XML element, but outside of XML tags (e.g., </title>EDITION:<edition>) using "insertTextAsContent":
    [xmlElementHere].insertTextAsContent("EDITION:", XMLElementPosition.beforeElement); 
    Does anyone know a good way to apply a paragraph style to that text without using a find & replace function later (after placing the XML into a text frame)?

    As posted into the other thread:
    Yes, each record will be in its own frame.
    You can use one of a couple solutions to stitch (link) each frame to the other, delete all but the first page and the first merged record, then resize that first merge frame and reflow the entire document.
    https://forums.adobe.com/thread/1341730?start=0&tstart=0
    Please review this thread. There is a couple posts with a script and you would want the last version of that script. You would have to follow the directions, as well as add a column at the beginning of your data and fill it with consecutive numbers.
    Alternatively, there is a free plug-in by Rohiko for stitching merge data frames together, then follow the process above to reflow the document.
    https://www.rorohiko.com/wordpress/indesign-downloads/textstitch/
    Mike

  • Selection text and text elements contents not displayed

    I have a language related problem
    I have 2 servers .
    In first server I logged in english language and the selection text and text elements are displayed in English.
    The requirement is I dont want to translate these texts it should be displayed in English only even if I log into SAP with other language.
    So if I log in german I see the texts in English in the first server.
    But this is not the case with second.
    If I log in with English I see the english texts but if I do in german I am not able to see this english text with proper contents .
    Can anybody let me know if there are any settings to be done ? As its working fine in first server but not in second .
    Edited by: Jalpa Shukla on Oct 22, 2008 11:19 AM

    Hello Jalpa Shukla,
    If you want to display the text in english language only better dont use Text-element
    instead of using text element you hard the text in the program then you will display the text in same in English.
    Try in this way, If not past the code i will give the solution

  • How to color the text element in selection screen

    hi,
    i am going to pass some text element in selection screen output  and my requiremnt is text element should be given some colour.
    plz guide me.
    regards
    muthuraman.d

    Hi...
    Dont Declare your field as OBLIGATORY.
    Instead perform the validation in AT SELECTION-SCREEN event. But validation should be only when Particular Radiobutton is selected.
    And Generate only Error Message (Type E).
    Try this code:
    AT SELECTION-SCREEN on <yOUR mandatory field>.
       IF PA_UPD = 'X'.
             IF <YOUR MANDATORY FIELD>  IS INITIAL.
                  Message 'Entry is must in this field' type 'E'.
             ENDIF.
       ENDIF.
    AT SELECTION-SCREEN OUTPUT.
    IF pa_udp = 'X'.
    LOOP AT SCREEN.
    IF screen-group1 = 'ABC'. "#CCE
    screen-active = 1.
    ELSEIF screen-group1 = 'DEF'.
    screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ELSEIF pa_rep = 'X'.
    LOOP AT SCREEN.
    IF screen-group1 = 'ABC'. "#CCE
    screen-input = 0.
    ELSEIF screen-group1 = 'DEF'.
    screen-active = 1.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ENDIF.
    <b>Reward if Helpful</b>

Maybe you are looking for

  • Is my headphone jack broken?

    I was just listening to music when I dropped my iphone 4s on to my floor. (It has an otterbox on it). After I picked it up, nothing would play through the headphones. I tried rebooting it, cleaning the headphone jack and I'm going to try to restore i

  • Branch VAT number in BSEG

    Hi All, The client is running EC sales report(S_ALR_87012400). And that report does not give the Branch customer VAT number updated documents(Credit memos) list .As BSEG table updates only main customer(Head Offfice customer )VAT number. The issue is

  • I am trying connect to a SQL instance for our CRM program and I am receiving To Connect to this Server you must use SQL Management Studio or SQL Server Management

    I am trying connect to a SQL instance for our CRM program and I am receiving To Connect to this Server you must use SQL Management Studio or SQL Server Management  This is a Brand new Server 2012 that is running our CRM product and it is trying to co

  • Multiple idoc to flat file

    Hi, i have  a scenario from idoc to flat file.There is two idoc that send message in same file.Without flat file content messages come succesfully.the format should be following: at the first  row should be the first idoc, at the second row should be

  • Extract FORM data into BINARY format or XSTRING format?

    Hello, Our config: I am developing an VISITOR Adobe Interactive Form, i have Designer 8.1 and Reader 9.0 in my Windows 7 Laptop. When i checked the menu EDIT-->form properties --> Compatability, its Adobe XML form File (XDP) When i opened this VISITO