Text clustering using kmeans & other classified algorithm

Hi,
Few questions:
1. How can we tweak Kmean_clustering algorithm to improve quality of clustering results?
The current arguments the algorithm accepts are:
MAX_DOCTERMS, MAX_FEATURES, THEME_ON , TOKEN_ON, STEM_ON, MEMORY_SIZE, SECTION_WEIGHT, CLUSTER_NUM
These arguments (apart from cluster_num) do not effect the algorithms quality. I remember reading in the documentation that: "k-Mean is a trade-off between quality and scalability", so how can a user chose between quality and scalability? What arguments can we play with? (Are arguments like number of iterations, distance metric avialable?, is yes, where and how can we specify?)
2. I tried searching for the documentation on the Textk (hierarchial clustering). But found that its undocumented. The arguments currently available are hierarchy depth and similary score but changing these arguments doesnt effect the clustering results. How can we improve Textk clustering results?
3. I tried applying the theme_on, cluster_num arguments on Textk (just as we can for kmeans). The algorithm didnt complain but it didnt care the changes either. The results didnt change. - Any suggestions?
4. Where can I find more documentation on clustering apart from the developer guide and general docs?
5. The concepts of 'stopword' and 'stoptheme' are quite confusing. Please if my understanding of these is correct:
Stopwords are usually NOT considered by the algorithm and are removed before any text analyses.
Stopthemes are words that could have weightage with other words and can influence the clustering results but will not affect the results by themselves (individual words as themes) - for example when we use 'THEME_ON' the algorithm will not consider adding the stopthemes to the feature set but might consider the 'phrases' which include these stoptheme words.
Hence, in clustering with THEME_ON preference, its best to add stopthemes rather than stopwords so that the algorithm might not create clusters based on words such as 'good' but might use phrases such as 'good example'
Is that right? Please guide...
Thanks!

Make the following true
ctx_ddl.set_attribute('my_cluster','STEM_ON','FALSE');
i.e.
ctx_ddl.set_attribute('my_cluster','STEM_ON','TRUE');
and then create the clusters. Also as you have already done, the lexer should have INDEX_STEM on

Similar Messages

  • Oracle text clustering - use of Stemming

    Hi,
    I am using K-means to cluster a set of documents. But I am unable to set the clustering algorithm parameters to use stemming for the tokens. The clustering algorithm uses 'move', 'moving', 'moves', 'moved' as separate words and clusters the documents into different clusters. I would like to group all the documents that contain 'move', 'moving', 'moves', 'moved' into a single group by using the stem 'move'. I am unable to do this so far. In case any of you have some ideas, please suggest.
    I use the following preferences and attributes to create a text index:
    BEGIN
    CTX_DDL.DROP_PREFERENCE ('test_lex');
    CTX_DDL.CREATE_PREFERENCE ('test_lex', 'BASIC_LEXER');
    CTX_DDL.SET_ATTRIBUTE ('test_lex', 'INDEX_STEMS', 'ENGLISH');
    END;
    drop index temp_idx;
    CREATE index temp_idx ON temp(text1) indextype is CTXSYS.CONTEXT parameters ('WORDLIST CTXSYS.BASIC_WORDLIST LEXER test_lex SYNC (ON COMMIT)');
    And below is the code I use to cluster the documents:
    create table temp0 (docid NUMBER, clusterid NUMBER, score NUMBER);
    create table temp1 (clusterid NUMBER, descript varchar2(4000), label varchar2(200), sze number, quality_score number, parent number);
    begin
    ctx_ddl.drop_preference('my_cluster');
    ctx_ddl.create_preference('my_cluster','KMEAN_CLUSTERING');
    ctx_ddl.set_attribute('my_cluster','CLUSTER_NUM','10');
    ctx_ddl.set_attribute('my_cluster','STEM_ON','FALSE');
    ctx_output.start_log('my_log');
    ctx_cls.clustering('temp_idx','seq','temp0','temp1','my_cluster');
    ctx_output.end_log;
    end;
    Thanks!

    Make the following true
    ctx_ddl.set_attribute('my_cluster','STEM_ON','FALSE');
    i.e.
    ctx_ddl.set_attribute('my_cluster','STEM_ON','TRUE');
    and then create the clusters. Also as you have already done, the lexer should have INDEX_STEM on

  • Is there a way to flip the pages in a .pdf so that all of the text is readable (in other words all documents are right side up)?  I have Adobe Acrobat X and am using Windows 8.1.

    Is there a way to flip the pages in a .pdf so that all of the text is readable (in other words all documents are right side up)?  I have Adobe Acrobat X and am using Windows 8.1.

    I have a pdf with over 2,000 pages, many of which are sideways.  I do not want to manually flip each one (few are next to each other).  Is there a way to automate the function so that all sideways or upside down text pages are righted?

  • Will not print text from PDFs - all other print is fine - Using nitro reader - Win7- HP4255

    Will not print text from PDFs - all other print is fine - Using nitro reader - Win7- HP4255

    Mulga
    Welcome to the HP Community Forum.
    Have you tried asking your question on the Nitro-Reader Forum?
    Nitro Reader Forum
    If you would like to try using the Adobe Reader, you might find help here:
    Manage Print Output with Print Preview
    See the section on PDF files
    Click the Kudos Thumbs-Up to show you appreciate the help.
    Click Accept as Solution when the Answer provides a Fix or Workaround!
    I am pleased to provide assistance on behalf of HP. I do not work for HP. 
    Kind Regards,
    Dragon-Fur

  • I just updated my Apple ID to a current email address, it worked on my laptop but my phone is still using the old one and neither password works. I can't download or use anything other than phone calls and texting on my phone now. Help!

    I just updated my Apple ID to a current email address, it worked on my laptop but my phone is still using the old one and neither password works. I can't download or use anything other than phone calls and texting on my phone now. Help!

    go to settings
    then to store
    tap your id then click sign out
    then sign back in and you should be fine

  • How do i delete my cell # from my daughters ipod touch?  I have changed the #'s in my apple id but it is still using the other cell # in their ipod touch for imessage which allows them to send recieve and read texts to that #.

    how do i delete my cell # from my daughters ipod touch?  I have changed the #'s in my apple id but it is still using the other cell # in their ipod touch for imessage which allows them to send recieve and read texts to that #.

    You can only uncheck the cell phone number. The only way to delete it is to use for FaceTime and Messages an Apple ID not associated with the iPhone.

  • Can oracle text be used to compare documents?

    lets say that i 've some documents stored in binary(LOB). can oracle text be used to compare documents and show their similarity on the basis of their content. how would i be able to compare documents using Oracle text. does it require mining algorithm like neural network. please help.
    thanks for reading.

    Thank you for your interest in my question. Let me see whether  I can further clarify it. In an ordinary PDF document, assume that I have a picture of a user interface for microsoft Word. The common method for identifying items in the picture, such as a toolbar, would be to either:
    --use a callout labeled "toolbar" that points to the toolbar
    or 
    --use a callout labelled "A" and have a caption underneath the picture that says: A) toolbar.
    What I would like to do is have text underneath the picture such as:
    "The major features of the interface shown above are:
    toolbar
    main menu
    status bar
    formatting menu"
    such that, when the user clicks one of the bullet items, the object becomes highlighted in the picture. The bullet list also needs to be translatable into Japanese. So, as far as I know, it can't be part of the swf file. Or can it?

  • Generic Text DataSource using FM

    Hi All,
    I need to create a generic text DataSource in R/3 using a FM.
    I tried to create a text DS using a FM based on FM RSAX_BIW_GET_DATA_SIMPLE (as template).
    I tested it in R/3 using RSA3 and everything worked as expected, but after replicating it in BW and assigning it to an InfoSource I detected a problem.
    What happens is that BW receives all existing records with all fields but the text field filled! I couldn't figure out why.
    I recon there's also another FM template which seems to be specific for text extraction (RSAX_BIW_GET_TEXTS), but this FM happens to be incompatible with a Generic DataSource, in other words FM RSAX_BIW_GET_TEXTS does not have the expected interface parameters.
    Has anyone ever successfully created a Generic text DataSource using a FM? I've looked around the forums and could not find any example.
    Thanks for the attention and for any help.
    Ricardo Calaça Nunes

    Hi Ajay,
    First of all, thanks for your reply. Answering your question: yes, that's exactly what happens.
    Let me explain my problem a little bit further. I've created a custom characteristic in BW, this InfoObject was created with texts option checked. I want to load texts for this InfoObject in BW using an algorithm that reads data in R/3 hence my need for a generic text DataSource using FM.
    FM RSAX_BIW_GET_TEXTS which is also a template seems to be specific for text extraction, but a generic DS is not accepting a extraction FM based on it because its parameter interface is different from FM RSAX_BIW_GET_DATA_SIMPLE.
    The latter is good for master data extraction, I've successfully used it in the past, but as mentioned in my previous post BW seems not to accept text fields in a extraction structure filled by a FM based on RSAX_BIW_GET_DATA_SIMPLE whether this FM is in a generic master data DS or else in a generic text DS.
    Can you imagine a possible solution?

  • Attaching text file using SO_NEW_DOCUMENT_ATT_SEND_API1

    hello guys, i'm a newbie here.
    I'm having trouble attaching an existing text file using function 'SO_NEW_DOCUMENT_ATT_SEND_API1'. It seems i can't find the right combination of parameters that are being passed to this function.
    first, i'm using WS_UPLOAD to upload the text file to an internal table then i'm creating all the neccessary internal tables that will be use by this function..
    By the way, i'm trying to send mail w/ attachments to external mail and SAPids. Below is my code.
    REPORT ZHR_TESTEMAIL .
    TABLES: USR02, PA0105, SOSU, SOUC, RLGRAP, IBIPPARMS, DYNPREAD, RSCSEL.
    DATA: FOLD_YR(2) TYPE C,
          FOLD_TYPE(3) TYPE C,
          G_HEADER LIKE SOOD2,
          G_FOLMAM LIKE SOFM2,
          METHOD1 LIKE SY-UCOMM,
          G_DOCUMENT LIKE SOOD4,
          G_USER LIKE SOUDNAMEI1,
          FOLD_NUMBER(12) TYPE C,
          G_NEW_PARENT LIKE SOODK,
          G_OWNER LIKE SOUD-USRNAM,
          G_REF_DOCUMENT LIKE SOOD4,
          G_USER_DATA LIKE SOUDATAI1,
          G_AUTHORITY LIKE SOFA-USRACC,
          G_OBJCNT LIKE SOLI OCCURS 0 WITH HEADER LINE,
          G_OBJHEAD LIKE SOLI OCCURS 0 WITH HEADER LINE,
          G_OBJPARA LIKE SELC OCCURS 0 WITH HEADER LINE,
          G_OBJPARB LIKE SOOP1 OCCURS 0 WITH HEADER LINE,
          G_RECIPIENTS LIKE SOOS1 OCCURS 0 WITH HEADER LINE,
          G_REFERENCES LIKE SOXRL OCCURS 0 WITH HEADER LINE,
          G_ATTACHMENTS LIKE SOOD5 OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF G_FILES OCCURS 10 ,
          TEXT(4096) TYPE C,
          END OF G_FILES.
    DATA: BEGIN OF IT_WS_FILE OCCURS 0,
          WS_FILE LIKE RLGRAP-FILENAME,
          END OF IT_WS_FILE.
    DATA: BEGIN OF IT_SAPID OCCURS 0,
          SAPID LIKE USR02-BNAME,
          END OF IT_SAPID.
    DATA: BEGIN OF IT_EMAIL OCCURS 0,
          EMAILADD LIKE PA0105-USRID_LONG,
          END OF IT_EMAIL.
    DATA: BEGIN OF IT_TSP01 OCCURS 0.
            INCLUDE STRUCTURE TSP01.
    DATA: END OF IT_TSP01.
    DATA: BEGIN OF TAB2 OCCURS 50,
          TEXT(200) TYPE C,
          END OF TAB2.
    DATA: V_DOCDATA TYPE SODOCCHGI1,
          V_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
          V_OBJHEAD LIKE SOLISTI1   OCCURS 0 WITH HEADER LINE,
          V_OBJTXT  LIKE SOLISTI1   OCCURS 0 WITH HEADER LINE,
          V_OBJBIN  LIKE SOLISTI1   OCCURS 0 WITH HEADER LINE,
          V_OBJHEX  LIKE SOLIX      OCCURS 0 WITH HEADER LINE,
          IT_RECVRS TYPE SOMLRECI1  OCCURS 0 WITH HEADER LINE,
          IT_CONTNT TYPE SOLISTI1   OCCURS 0 WITH HEADER LINE,
          IT_BODY   LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE,
          V_TLIN    TYPE I,
          V_LINE    TYPE I.
    DATA: BEGIN OF IT_TEXTLINE OCCURS 500,
          TEXTLINE(5000),
          END OF IT_TEXTLINE.
    DATA: FYL LIKE RLGRAP-FILENAME,
          GV_SUBNO LIKE SOSU-SUBNO,
          GV_EMAIL LIKE PA0105-USRID_LONG,
          GV_NEXTDAY LIKE SY-DATUM,
          YEAR(4) TYPE C,
          RECFLAG TYPE C.
    SELECTION-SCREEN BEGIN OF BLOCK PARAM WITH FRAME TITLE TEXT-001.
    PARAMETERS: SUBJ(254) TYPE C OBLIGATORY,            "Subject
                DESC(254) TYPE C.                       "Message
    SELECT-OPTIONS: SAPID FOR USR02-BNAME NO INTERVALS. "Recipient's SAP ID
    SELECT-OPTIONS: EMAILADD FOR PA0105-USRID_LONG NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK PARAM.
    SELECTION-SCREEN BEGIN OF BLOCK PARAM2 WITH FRAME TITLE TEXT-002.
    SELECT-OPTIONS: WS_FILE FOR DYNPREAD-FIELDNAME NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK PARAM2.
    SELECTION-SCREEN BEGIN OF BLOCK PARAM3 WITH FRAME TITLE TEXT-003.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: RBUT1 RADIOBUTTON GROUP A USER-COMMAND BUT. "Local PC
    SELECTION-SCREEN COMMENT 5(20) FOR FIELD RBUT1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: RBUT2 RADIOBUTTON GROUP A.                  "Server
    SELECTION-SCREEN COMMENT 5(20) FOR FIELD RBUT2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: RBUT3 RADIOBUTTON GROUP A.                  "Spool
    SELECTION-SCREEN COMMENT 5(20) FOR FIELD RBUT3.
    PARAMETERS: SPOOLNUM LIKE RSPOTYPE-RQNUMBER.            "Spool Number
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK PARAM3.
    SELECTION-SCREEN BEGIN OF BLOCK PROC WITH FRAME TITLE TEXT-004.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETER: BPROC AS CHECKBOX USER-COMMAND BCK. "Background Processing
    SELECTION-SCREEN COMMENT 5(50) FOR FIELD BPROC.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK PROC.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR WS_FILE-LOW.
      DATA: WS_FILE_TEMP TYPE IBIPPARMS-PATH.
      CLEAR: WS_FILE_TEMP.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                PROGRAM_NAME  = SY-REPID
                DYNPRO_NUMBER = SY-DYNNR
                FIELD_NAME    = 'WS_FILE'
           IMPORTING
                FILE_NAME     = WS_FILE_TEMP.
      WS_FILE-LOW = WS_FILE_TEMP.
    AT SELECTION-SCREEN.
      SELECT SAPNAM FROM SOUC
          INTO TABLE IT_SAPID
          WHERE SAPNAM IN SAPID
            AND DELETED = ''.
      GV_NEXTDAY = SY-DATUM + 1.
      LOOP AT EMAILADD.
        IT_EMAIL-EMAILADD = EMAILADD-LOW.
        APPEND IT_EMAIL.
        CLEAR: IT_EMAIL.
      ENDLOOP.
      IF NOT BPROC IS INITIAL.
        CLEAR: RBUT1, RBUT3.
        RBUT2 = 'X'.
      ELSE.
        CLEAR: RBUT2.
      ENDIF.
      IF NOT RBUT3 IS INITIAL.
        REFRESH: WS_FILE.
      ENDIF.
      IF SAPID IS INITIAL AND EMAILADD IS INITIAL.
        MESSAGE E000(ZZ) WITH TEXT-201.
      ELSEIF NOT SAPID IS INITIAL AND EMAILADD IS INITIAL.
        CLEAR IT_SAPID.
        READ TABLE IT_SAPID.
        SELECT SINGLE SUBNO FROM SOSU
          INTO GV_SUBNO
          WHERE USRNO IN ( SELECT USRNO FROM SOUC
                             WHERE SAPNAM = IT_SAPID-SAPID ).
        IF SY-SUBRC NE 0.
          MESSAGE E000(ZZ) WITH TEXT-202.
        ENDIF.
        CLEAR: IT_SAPID.
      ELSEIF NOT SAPID IS INITIAL AND NOT EMAILADD IS INITIAL.
        CLEAR: IT_SAPID, IT_EMAIL.
        READ TABLE IT_SAPID.
        READ TABLE IT_EMAIL.
        SELECT SINGLE SUBNO FROM SOSU
          INTO GV_SUBNO
          WHERE USRNO IN ( SELECT USRNO FROM SOUC
                             WHERE SAPNAM = IT_SAPID-SAPID ).
        IF SY-SUBRC NE 0.
          SUBMIT RSSOADM0 WITH USRNAM EQ IT_SAPID-SAPID
                          WITH NEW_SUBS EQ IT_EMAIL-EMAILADD
                          WITH SUB_ESC EQ 'U'
                          WITH EDAT EQ SY-DATUM
                          WITH BDAT EQ SY-DATUM
                         WITH BDAT EQ GV_NEXTDAY
                         WITH EDAT EQ '99991231'
                          WITH BTIM EQ SY-UZEIT
                          WITH ETIM EQ '240000'
                          WITH FORW_ALL EQ 'X'
                          WITH PSTHR2 EQ ''
                          AND RETURN.
        ENDIF.
        CLEAR: IT_SAPID.
      ELSEIF NOT EMAILADD IS INITIAL AND SAPID IS INITIAL.
        RECFLAG = 'X'.
      ENDIF.
    START-OF-SELECTION.
        PERFORM B_SENDMAIL.
    FORM B_SENDMAIL.
      YEAR = SY-DATUM+0(4).
      LOOP AT WS_FILE.
        CLEAR: FYL.
        FYL = WS_FILE-LOW.
        REFRESH: TAB2.
        CALL FUNCTION 'WS_UPLOAD'
             EXPORTING
                  FILENAME = FYL
                  FILETYPE = 'BIN'
             TABLES
                  DATA_TAB = TAB2.
        IT_TEXTLINE[] = TAB2[].
    DOCUMENT_DATA (SUBJECT OF MAIL)
        V_DOCDATA-OBJ_NAME   = DESC.
        V_DOCDATA-OBJ_DESCR  = SUBJ.
        V_DOCDATA-OBJ_LANGU  = SY-LANGU.
        V_DOCDATA-SENSITIVTY = 'C'.
        V_DOCDATA-OBJ_PRIO   = '1'.
    BODY OF MAIL
        IT_BODY-LINE = 'Collection Report'.
        APPEND IT_BODY.
    CONTENTS_TXT (Attachments)
        IT_CONTNT[] = IT_TEXTLINE[].
        DESCRIBE TABLE IT_CONTNT LINES V_LINE.
        READ TABLE IT_CONTNT INDEX V_LINE.
    PACKING_LIST
        V_OBJPACK-DOC_SIZE = ( V_LINE - 1 ) * 255 + STRLEN( IT_CONTNT ).
        V_OBJPACK-TRANSF_BIN = 'X'.
        V_OBJPACK-HEAD_START = 1.
        V_OBJPACK-HEAD_NUM   = 0.
        V_OBJPACK-BODY_START = 1.
        V_OBJPACK-BODY_NUM   = V_LINE.
        V_OBJPACK-DOC_TYPE   = 'TXT'.
        V_OBJPACK-OBJ_NAME   = 'ATTACHMENT'.
        V_OBJPACK-OBJ_DESCR  = 'Attached Document'.
        APPEND V_OBJPACK.
        CLEAR  V_OBJPACK.
    RECEIVERS of mail
        IF RECFLAG IS INITIAL.
          LOOP AT IT_SAPID.
            IT_RECVRS-RECEIVER   = IT_SAPID-SAPID.
            IT_RECVRS-REC_TYPE   = 'B'.
            IT_RECVRS-COM_TYPE   = ''.
            IT_RECVRS-EXPRESS    = 'X'.
            IT_RECVRS-NO_FORWARD = ''.
            IT_RECVRS-NO_PRINT   = ''.
            APPEND IT_RECVRS.
            CLEAR IT_RECVRS.
          ENDLOOP.
        ELSE.
          LOOP AT EMAILADD.
            IT_RECVRS-RECEIVER   = EMAILADD-LOW.
            IT_RECVRS-REC_TYPE   = 'U'.
            IT_RECVRS-COM_TYPE   = 'INT'.
            IT_RECVRS-EXPRESS    = 'X'.
            APPEND IT_RECVRS.
            CLEAR IT_RECVRS.
          ENDLOOP.
        ENDIF.
    OBJECT_HEADER (Filename)
        CONCATENATE 'Collection Report' '_'
                     SY-DATUM+4(4) YEAR '.TXT'
                     INTO V_OBJHEAD-LINE.
       V_OBJHEAD-LINE = FYL+16(25).
        APPEND V_OBJHEAD.
        CLEAR V_OBJHEAD.
    Function Module For Sending Mail with Attachment
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
             EXPORTING
                  DOCUMENT_DATA              = V_DOCDATA
             TABLES
                  PACKING_LIST               = V_OBJPACK
                  OBJECT_HEADER              = V_OBJHEAD
                  CONTENTS_HEX               = IT_CONTNT
                  CONTENTS_TXT               = IT_BODY
                  RECEIVERS                  = IT_RECVRS
             EXCEPTIONS
                  TOO_MANY_RECEIVERS         = 1
                  DOCUMENT_NOT_SENT          = 2
                  DOCUMENT_TYPE_NOT_EXIST    = 3
                  OPERATION_NO_AUTHORIZATION = 4
                  PARAMETER_ERROR            = 5
                  X_ERROR                    = 6
                  ENQUEUE_ERROR              = 7
                  OTHERS                     = 8.
        IF SY-SUBRC = 0.
          MESSAGE S000(ZZ) WITH TEXT-005.
        ELSE.
          MESSAGE S000(ZZ) WITH TEXT-006.
        ENDIF.
      ENDLOOP.
    end of my code *
    please help me guys... when i run this program,    DOCUMENT_NOT_SENT is what i always get.. 
    waiting for ur reply... thank you vey much and godbless.

    Hi,
    Try this sample code.
    FORM SEND_TO_EMAIL USING zFName.
      DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
      DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
      DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
      DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
      DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
      DATA: DOC_CHNG LIKE SODOCCHGI1.
      DATA: TAB_LINES LIKE SY-TABIX.
      DATA: ctmp(50) TYPE C.
    Creation of the document to be sent
      DOC_CHNG-OBJ_NAME = 'JOURNAL'.
      CONCATENATE 'SAP Payroll Journal file Period' pybegda INTO ctmp
                  SEPARATED BY SPACE.
      DOC_CHNG-OBJ_DESCR = cTmp.
      OBJTXT = 'SAP Payroll Journal'.
      APPEND OBJTXT.
      CONCATENATE 'For Period' pybegda INTO ctmp
                  SEPARATED BY SPACE.
      OBJTXT = ctmp.
      APPEND OBJTXT.
      CONCATENATE 'Attached File :' zFname INTO ctmp
                  SEPARATED BY SPACE.
      OBJTXT = ctmp.
      APPEND OBJTXT.
      OBJTXT = 'Please find the attachment.'.
      APPEND OBJTXT.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creation of the entry for the compressed document
      CLEAR OBJPACK-TRANSF_BIN.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM = 0.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM = TAB_LINES.
      OBJPACK-DOC_TYPE = 'RAW'.
      APPEND OBJPACK.
    Creation of the document attachment
      <b>LOOP AT xMail.
        CONDENSE xMail-aline.
        OBJBIN = xMail-aline.
        APPEND OBJBIN.
        CLEAR OBJBIN.
      ENDLOOP.</b>
      DESCRIBE TABLE OBJBIN LINES TAB_LINES.
      OBJHEAD = zFname. APPEND OBJHEAD.
    Creation of the entry for the compressed attachment
      OBJPACK-TRANSF_BIN = 'X'.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM = 1.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM = TAB_LINES.
      OBJPACK-DOC_TYPE = 'RAW'.
      OBJPACK-OBJ_NAME = 'DATA'.
      OBJPACK-OBJ_DESCR = 'SAP Payroll File'.
      OBJPACK-DOC_SIZE = TAB_LINES * 255.
      APPEND OBJPACK.
    Completing the recipient list
      LOOP AT PENERIMA.
        CONDENSE PENERIMA-PNRM.
        RECLIST-RECEIVER = PENERIMA-PNRM.
        RECLIST-REC_TYPE = 'U'.
        APPEND RECLIST.
      ENDLOOP.
    Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = DOC_CHNG
                PUT_IN_OUTBOX              = ' '
           TABLES
                PACKING_LIST               = OBJPACK
                OBJECT_HEADER              = OBJHEAD
                CONTENTS_BIN               = OBJBIN
                CONTENTS_TXT               = OBJTXT
                RECEIVERS                  = RECLIST
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
                OTHERS                     = 99.
      CASE SY-SUBRC.
        WHEN 0.
          WRITE: / 'Result of the send process:'.
          LOOP AT RECLIST.
            WRITE: / RECLIST-RECEIVER(48), ':'.
            IF RECLIST-RETRN_CODE = 0.
              WRITE / 'The document was sent'.
            ELSE.
              WRITE / 'The document could not be sent'.
            ENDIF.
          ENDLOOP.
        WHEN 1.
          WRITE: / 'Too many receiver'.
        WHEN 2.
          WRITE: / 'Document could not be sent to any recipient'.
        WHEN 4.
          WRITE: / 'No send authorization'.
        WHEN OTHERS.
          WRITE: / 'Error occurred while sending'.
      ENDCASE.
    ENDFORM.

  • Why do text variables using Running Header character style translate forced returns as a word space in the running head on the first page but close up the space on subsequent pages?

    In an InDesign document that requires 3 different Chapter head paragraph styles (to cope with differrent length headings) I've set up the running heads on the master page with a text variable using the Running header (character style) option. The character style I've assigned to this is an empty character style that is applied to all 3 chapter head paragraph styles.
    Some chapter heads require a forced line break, so that the line breaks are aethesically pleasing. On the first page the text variable translates this forced line break as a word space in the running head, but on subsequent pages it ignores the forced line break. This means that if you have a word space before the forced line break, on the first page you get a double word space and on subsequent pages the running head sets correctly with a single word space. But if you remove the word space before the forced line break in the chapter head text, the first running head sets correctly with forced line break interpreted as a single word space, but on subsequest pages the space is closed up.
    This only seems to be a problem when the character style option is used for header text variables. If a paragraph style is used the forrced line break is interpreted as a a single word space in all instances, both on the foirst page and subsequent pages.
    This would appear to be a bug in how text variables are applied when using the Running header (character style) option. I can't see any other reason why the text variable would beheave differently on the first page and on subsequent pages. There is only one master page, so it isn't a case of their being an error between a main master page and a chapter opener master page.
    Does anyone have any solutionss, or know if this problem has been fixed in subsequent releases of InDesign (I'm using CS6 ID version 8.0)
    Thanks

    Ask in the ID forum...
    Mylenium

  • How to smooth text when using 720p HDTV as monitor?

    I know I'm not using the best choice for a Monitor, but want to tweak it the best I can.
    Sony Bravia BX 320, 720P TV as my monitor
    New Mac Mini bought yesterday
    1080P Display Setting in Mini's display profiles
    720P ibid
    Connected via HDMI
    Have tried tweaking around with different Mac Display profiles and color calibrations. Above look the best as far as resolution and picture when sitting far away from screen.
    Closer I get to screen, the more pixelated and crappy the text looks, which is really bad
    What are the tweakablle settings, both in the monitor and computer I would want to play with to smooth the text out as best as is possible given my monitor choice?
    What would be a better "TV" choice to use as a monitor for my Mini? I only run a Roku and OTA HDTV into the TV tuner.
    Is there a choice that looks good in both TV and Mini monitoring applications?
    Thanks so much.

    I have never used any of this, I have never needed to use it. I just know that the information is around and has been useful to others.
    I also saved this tutoial that I found once. Perhaps it can help you;
    SwitchResX Tutorial
    0. All of this is easier to do if you have a portable Mac, since you can configure the external display while viewing everything on the built-in display. You can do it with only the external display (your big TV, that is), but it's tedious.
    1. Get the proper cable to connect your Mac to the display (VGI, DVI, or DVI->HDMI, depending on your display's inputs; if you're using a portable Mac with only mini-DVI you'll need the adapter *and* a cable).
    2. Connect the display and turn on the Mac. Launch the SwitchResX Control application (if all you're doing is setting up a custom configuration, you don't need the preference pane and thus don't need APE either).
    3. In the SwitchResX Control application, select the display you want to configure in the "Settings of:" menu (if it isn't selected already) and click the "Display" tab. Then click the "Export DDC" button and select a location to save the file.
    4. Using the text editor of your choice (TextEdit works, or you may have a preference for something else) open that file you just exported. You should see at least one Monitor Description Block (mine has two, labeled Descriptor #0 and Descriptor #1). This should give you a starting point. Mine looks like this:
    Code:
        Descriptor #0 is Timing definition:
        Mode = 1920 x 540 @  60Hz
            H. Active...............1920 pixels
            H. Blanking.............280 pixels
            V. Active...............540 lines
            V. Blanking.............22 lines
            HSync Offset............88 pixels
            HSync Pulse Width.......44 pixels
            VSync Offset............2 lines
            VSync Pulse Width.......5 lines
            Pixel Clock.............74.25MHz
            Horizontal freq.........33.75kHz
            Vertical freq...........60.05Hz
            H Image Size............16mm
            V Image Size............9mm
            H Border................0 pixels
            V Border................0 lines
                Interlaced
                Sync: Digital separate with
                    * Positive vertical polarity
                    * Positive horizontal polarity
    Note that the Mode is described as 1920 x 540 @ 60Hz, interlaced. It's actually 1920 x 1080, interlaced. I'm not sure why the vertical resolution is half what it should be there, but that's an important detail to note. If yours looks like it's half what it should be, you'll have to double it below. Use your common sense here.
    The next step depends on what problem you need to solve. If you have a picture and you just need to adjust its position and/or size, you have the easier task and these instructions can help you. If you don't have a picture at all, the values provided by your display are invalid, and you'll have to do some research to find valid values (I can't help you find them). Search and/or ask on this forum, and also try Google.
    5. Click on the "Custom" tab in the SwitchResX Control app. Click the "+" button to create a new resolution. Select "Custom" in the menu at the top (as opposed to "Scaled"). Start by entering the values in the Monitor Description Block you exported and opened in a text editor. The thing to realize as you get started is that all the numbers interact with each other, and as you change one value the application will recalculate the others if they're affected by the change. At a given resolution, the number of horizontal pixels and the number of vertical lines in each box always have to add to the same totals, and you can get those values by adding the "Active" and "Blanking" values in the Monitor Timing Block. To stick with my display, the horizontal pixel values must add up to 2200 (1920 (H. Active) + 280 (H. Blanking)), and the vertical line values must add up to 1124 (2 * (540 (V. Active) + 22 (V. Blanking))). The horizontal and vertical scan rates are calculated using those total values and the pixel clock value.
    This is a very important concept to understand. With a constant pixel clock value and constant totals of Active + Blanking in both axes, the scan rates should also remain constant. If you have changed your active, porch, or sync width values and the scan rates don't add up, you won't get any picture. To use my display as an example again:
    Code:
    Pixel Clock 74.25 Mhz, Interlaced
                Horizontal      Vertical
    Active:     1920 pixels     1080 lines
    Frt. porch: 88 pixels       4 lines
    Sync width: 44 pixels       10 lines
    Back porch: 148 pixels      30 lines
    Scan rate:  33.75 kHz       60.05 Hz
    Note that 1920 + 88 + 44 + 148 = 2200, and 1080 + 4 + 10 + 30 = 1124.
    6a. Adjust the values to fit your display (heh). This is the trial-and-error portion of the task, and is also slightly counterintuitive. You can get an idea of the adjustments you need to make if you use DisplayConfigX to display an "Image Size Test" (in the "Test Screen" tab). It'd make life easier if that were built into SwitchResX, but anyway:
    If you need to shrink the visible area, decrease the Active value and increase the front or back porch values by the same amount. If you need to increase it, do the opposite. It helps to work incrementally (say, by multiples of 8) and save and test your work as you go along. Note that you may not actually need to restart the computer: I found that I could just unplug the HDMI cable from the back of my display and plug it back in, and the new settings would take effect. Remember to click "OK" (and not "Cancel") in the Timing Parameters window, then "Apply" in the main window, before you do this, or before you reboot. Otherwise your changes will be lost.
    The porch values are counterintuitive. The horizontal "front porch" is the right edge of the screen (not the left as you might expect); the vertical "front porch" is the bottom edge of the screen. To move the image to the right, decrease the horizontal front porch and increase the horizontal back porch; to move it to the left increase the front porch and decrease the back porch. To move the image up, increase the vertical front porch and decrease the back porch, to move it down, decrease the front porch and increase the back porch. Again, it helps to save and restart or disconnect/reconnect the display to test these adjustments. The "Quick change" buttons in the bottom right-hand corner of the Timing Parameters window will adjust the porches for you, but note that in older versions the buttons were reversed (down means up and left means right, if you catch my drift). That's been fixed in version 3.7.6, apparently.
    Also, remember as you adjust porch values that you shouldn't ever need to change the sync width.
    6b. You know how I said you might not need to restart the computer? That's not actually 100% true for some displays. When I boot my computer with the display connected, the image is shifted to one side. If I subsequently change resolutions in software or disconnect and reconnect the display, the image will shift back. I got around this problem by first coming up with a configuration that was properly aligned after such a switch. After I had that I rebooted and estimated how far the image was shifted to one side. I then adjusted the porch values, saved, rebooted, and tested again. I now have two configurations, one for "fresh boot" that's adjusted for that sideways shift, and one I can use if I've changed the resolution for some reason. After all that, my default settings are now:
    Code:
    Pixel Clock 74.25 Mhz, Interlaced
                Horizontal      Vertical
    Active:     1834 pixels     1024 lines
    Frt. porch: 120 pixels      40 lines
    Sync width: 44 pixels       10 lines
    Back porch: 202 pixels      50 lines
    Scan rate:  33.75 kHz       60.05 Hz
    Again, 1834 + 120 + 44 + 202 = 2200, and 1024 + 40 + 10 + 50 = 1124. The Pixel Clock and both scan rates are the same as I found in the DDC.
    Note also that if you have the same sideways shift problem, your two resolutions can't be identical (the system won't know which one to select). I made mine different by two pixels of horizontal resolution, which turns out to be rounded off in practice anyway (so one's 1832 x 1024, and the other's 1834 x 1024, with porch values adjusted accordingly, but they both look the same).
    At this point you should be able to align your desktop to your display by iterating through these steps, applying your changes, and either disconnecting and reconnecting the display or rebooting.
    7. If ever you go horribly wrong and go from having a misaligned picture to having no picture at all, you'll have to delete the override installed by SwitchResX. Boot the computer into Safe Mode, launch the SwitchResX Control app again, and click the "Factory settings" button, then the "Apply" button, and reboot.
    And as a preemptive strike: no, I probably don't own your display and don't know the numbers for it offhand, and my consulting rate is $45/hr (really!). 
    Copyright Fedward. All rights reserved, all wrongs reversed.

  • Upload Purchase order text tab using BDC

    Is it possible to upload Purchase order text tab in material master (tcode mm01) using a BDC.
    If so pls tell me how to upload the same, what is the field name of the box.
    Regards,
    Senthil

    u need to use READ_TEXT or SAVE_TEXT or WRITE_TEXT or COMMIT_TEXT to upload text into SAP.

  • Multi-language support for user-specified text strings used in the forms

    multi-language support for user-specified text strings used in the forms
    Instead of creating multiple forms, 1 in each different language, for the same service, is there any workaround?

    Hoan - is your question what are the considerations when creating multiligual catalogs? If so, I can tell you that at other clients I have seen them use a single catalog for one or two languages. For the two langugages, such as Spanish/English, you can create a single catalog with both of them. Once you get to more than two languages, the catalog would get unweildy and is therefore not suggested.

  • How to print a text file using Java

    How can I print a text file using Java without converting the output to an image format. Is there anyway I can send the characters in the text file as it is for a print job? I did get a listing doing this ... but that converted the text to an image format before printing....
    THanks,.

    Hi I had to write a print api from scratch, and I did not convert the output to image. Go and read up on the following code. I know there is a Tutorial on Sun about the differant sections of the snippet.
    private void printReport()
         Frame tempFrame = new Frame(getName());
         PrintJob printerJob = Toolkit.getDefaultToolkit().getPrintJob(tempFrame, "Liesltext", null);
         Graphics g = printerJob.getGraphics();
                    //I wrote the method below for calculations
         printBasics(g);
         g.dispose();
         printerJob.end();
    }This alone wont print it you have to do all the calculations in the printBasics method. And as I said I wrote this from scratch and all I did was research first the tutorial and the white papers
    Ciao

  • How to download a text file using classes

    Hi Guys
    I want to download a text file using classes.
    Any idea how to do it ?
    Thanks
    Sameer

    HI sameer,
       It is no different from using a Function module.
    example:
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename                  = w_fpath
        append                    = SPACE
          write_field_separator     = 'X'
        CHANGING
          data_tab                  = it_download
        EXCEPTIONS
          file_write_error          = 1
          no_batch                  = 2
          gui_refuse_filetransfer   = 3
          invalid_type              = 4
          no_authority              = 5
          unknown_error             = 6
          header_not_allowed        = 7
          separator_not_allowed     = 8
          filesize_not_allowed      = 9
          header_too_long           = 10
          dp_error_create           = 11
          dp_error_send             = 12
          dp_error_write            = 13
          unknown_dp_error          = 14
          access_denied             = 15
          dp_out_of_memory          = 16
          disk_full                 = 17
          dp_timeout                = 18
          file_not_found            = 19
          dataprovider_exception    = 20
          control_flush_error       = 21
          not_supported_by_gui      = 22
          error_no_gui              = 23
          OTHERS                    = 24
    Regards,
    ravi

Maybe you are looking for

  • ITunes Match on a Synology Nas - many exclamation marks in the first row

    Hi, I transfared my entire iTunes Libary of roughly 26.000 Songs (1.000 plus bought on iTunes) to my Synology NAS.  Now when I start iTunes on my MacBook via WiFi it takes quite some time to be ready to play. Each time I open the Library on my NAS iT

  • Unable to set some Aperture metadata fields

    I've had a few minor problems with Aperture 3.2.3 lately while trying to tag a whole lot of photos from a recent holiday. I have been trying to set a number of fields and this morning I was looking at using the IPTC Image Location field. Initially I

  • How to create email page in Apex

    All, I want to create email page but the email process type within Apex seems to be having some limitation i want to have multiple receivers/recipients, attachments etc. What is the best and most preferred approach? i searched "Application Express Bu

  • HP L7590 Printer only scans portions of the page

    I have an HP Office Jet Pro L7590 Printer.  Just today, the scanning feature starting acting up.  When it scans it only scans a portion of the page.  It goes through all the motions as though it is scanning everything.  I also need to send a FAX.  Tw

  • Why is the stroke causing a blob during the animation of my text?

    Hi, I have a simple text layer that I have applied a stroke to and then added the text animation preset "blur by word".  During the anmiation, the stroke causes this ugly blob of black. See attached image. How do I fix this? Thanks, Scott