Need Sample Code for Vendor creation using JAVA API

Hi,
I have a scenario like Vendor creation using <b>Java API</b>.
1.I have Vendors (Main) Table.
2.I have <b>look up</b> tables like Account Group.
3.Also <b>Qualifier table</b>(Phone numbers) too.
Could you please give me the sample code which helps me to create Vendor records using Java API?
<b>I need Code samples which should cover all of the above scenario.</b>
<b>Marks will be given for the relevent answers.</b>
Best Regards
PK Devaraj

Hi Devraj,
I hope the below code might solve all your problem:-
//Adding Qualified field
//Creating empty record in Qualifed table 
//Adding No Qualifiers
Record qualified_record = RecordFactory.createEmptyRecord(new TableId(<TableId>));
try {
qualified_record.setFieldValue(new FieldId(<fieldId of NoQualifier), new StringValue(<StringValue>));//Adding No Qualifier
catch (IllegalArgumentException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
catch (MdmValueTypeException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
//Creating Record in Qualified table
CreateRecordCommand create_command = new CreateRecordCommand(connections);
create_command.setSession(sessionId);
create_command.setRecord(qualified_record);
try
create_command.execute();
catch(Exception e)
System.out.println(e.toString());
RecordId record_id = create_command.getRecord().getId();
//Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
QualifiedLookupValue lookup_value = new QualifiedLookupValue();
int link = lookup_value.createQualifiedLink(new QualifiedLinkValue(record_id));
//Adding Yes Qualifiers
lookup_value.setQualifierFieldValue(0 , new FieldId(<FieldID of Yes Qualifier>) , new StringValue(<StringValue>));
//Now adding LookUP values
//Fetch the RecordID of the value selected by user using the following function
public RecordId getRecordID(ConnectionPool connections , String sessionID , String value , String Fieldid , String tableid)
ResultDefinition rsd = new ResultDefinition(new TableId(tableid));
rsd.addSelectField(new FieldId(Fieldid));
StringValue [] val = new StringValue[1];
val[0] = new StringValue(value);
RetrieveRecordsByValueCommand val_command = new RetrieveRecordsByValueCommand(connections);
val_command.setSession(sessionID);
val_command.setResultDefinition(rsd);
val_command.setFieldId(new FieldId(Fieldid));
val_command.setFieldValues(val);
try
     val_command.execute();
catch(Exception e)
RecordResultSet result_set = val_command.getRecords();
RecordId id = null;
if(result_set.getCount()>0)
     for(int i = 0 ; i < result_set.getCount() ; i++)
     id = result_set.getRecord(i).getId();     
return id;
//Finally creating the record in Main table
com.sap.mdm.data.Record empty_record = RecordFactory.createEmptyRecord(new TableId("T1"));
try {
     empty_record.setFieldValue(new FieldId(<FieldId of text field in Main table>),new StringValue(<StringValue>));
     empty_record.setFieldValue(new FieldId(<FieldId of lookup field in Main table>), new LookupValue(<RecordID of the value retrieved using the above getRecordID function>));
empty_record.setFieldValue(new FieldId(<FieldId of Qualified field in Main table>), new QualifiedLookupValue(<lookup_value>));//QualifiedLookUp  value Retrieved above
} catch (IllegalArgumentException e1) {
// TODO Auto-generated catch block
     e1.printStackTrace();
} catch (MdmValueTypeException e1) {
     // TODO Auto-generated catch block
     e1.printStackTrace();
//Actually creating the record in Main table
CreateRecordCommand create_main_command = new CreateRecordCommand(connections);
create_main_command.setSession(sessionId);
create_main_command.setRecord(empty_record);
try
     create_main_command.execute();
catch(Exception e)
     System.out.println(e.toString());
Thanks
Namrata

Similar Messages

  • Need sample code for Using BADI ME_PROCESS_REQ_CUST

    Dear all,
    Initially my requirement is to Validate the Document Type of Purchase Request ion as per material.
    I have created a implementation for BADI : ME_PROCESS_REQ_CUST .
    im new to OOPS-ABAP, so pls send *sample code for how to use these methods PROCESS_ITEM,
    like declarations, assignment of data into internal table  for further validation*.
    Regards,
    NIranjan.G

    Hi,
    get the item data ....
         *DATA : lt_item TYPE MEREQ_ITEM,
                       ls_item liek line of it_item*
             CALL METHOD im_item->GET_DATA
               RECEIVING
                 RE_DATA = lt_item .
    you will get the data in lt_item.. table
    Thanks,
    Shailaja Ainala.

  • Need sample code to connect MDM using JCA

    hi friends,
    I want to connect MDM server using JCA
    can you please provide me the sample code for that.
    Regards,
    Venki

    Hello Venki,
    why do you want to use JCo for connecting to MDM? MDM has its own specific Java API for this task. There's no need for using JCo at all.
    BR Michael.

  • Need sample code to connect MDM using JCO

    hi friends,
    I want to connect MDM server using JCO,
    can you please provide me the sample code for that.
    Regards,
    Venki.

    Hello Venki,
    why do you want to use JCo for connecting to MDM? MDM has its own specific Java API for this task. There's no need for using JCo at all.
    BR Michael.

  • I need a code for VENDOR AGEING REPORT

    plz help me i am in urgent need of source code of
    VENDOR AGEING REPORT.
    if any body help me regarding this above report i will be
    great ful to him/her.
    bcoz deadline is today.
    i  need ur urgent help, i treid very much but i failed,
    so hope help from anybody there.

    REPORT  zvender_os NO STANDARD PAGE  HEADING
                                  LINE-SIZE 132
                                  LINE-COUNT 65.
    Tables
    TABLES: bsik,          "open items (A/C: Secondary Index for Customers)
            lfa1,          "customer master
            lfb1,
            rf140,        "temp stru (Work Fields for Corrence(SAPF140*))
            bsak,          "cleared items (A/c Secnd Index for Cust(Clrms))
            skat.
    constants and variables
    TYPE-POOLS: slis.
    DATA: fieldcat             TYPE slis_t_fieldcat_alv,
          fieldcat1             TYPE slis_t_fieldcat_alv,
          fieldcat_ln          TYPE slis_fieldcat_alv,
          layout_in            TYPE slis_layout_alv,
          layout_in1           TYPE slis_layout_alv,
          sortcat              TYPE slis_t_sortinfo_alv,
          sortcat1              TYPE slis_t_sortinfo_alv,
          sortcat_ln           LIKE LINE OF sortcat,
          eventcat1             TYPE slis_t_event,
          eventcat             TYPE slis_t_event,
          eventcat_ln          LIKE LINE OF eventcat,
          col_pos              TYPE i.
    DATA:  targ_month(2)         TYPE n,                        "0001
           targ_year(4)          TYPE n,                        "0001
           targ_mth_abs          TYPE p,                        "0001
           doc_month(2)          TYPE n,                        "0001
           doc_year(4)           TYPE n,                        "0001
           doc_mth_abs           TYPE p,                        "0001
           mth_result            TYPE p,                        "0001
           doc_days              TYPE p,
           targ_days             TYPE p,
           addl_days             TYPE p,
           ext_days              TYPE p,
           v_days(3)             TYPE c,
           v_kkber               LIKE knkk-kkber.
    DATA:
          BEGIN OF inrec OCCURS 1000,                           "0001
            lifnr    LIKE bsik-lifnr,
            belnr    LIKE bsik-belnr,
            gjahr    LIKE bsik-gjahr,
            bldat    LIKE bsik-bldat,
            xblnr    LIKE bsik-xblnr,
            blart    LIKE bsik-blart,
            sgtxt    LIKE bsik-sgtxt,
            shkzg    LIKE bsik-shkzg,
            dmbtr    LIKE bsik-dmbtr,
            zfbdt    LIKE bsik-zfbdt,
            zbd1t    LIKE bsik-zbd1t,
            zbd2t    LIKE bsik-zbd2t,
            zbd3t    LIKE bsik-zbd3t,
            zuonr    LIKE bsik-zuonr,
          END OF inrec.
    DATA:
          BEGIN OF inrect OCCURS 1000,                          "0001
            lifnr    LIKE bsik-lifnr,
            belnr    LIKE bsik-belnr,
            gjahr    LIKE bsik-gjahr,
            bldat    LIKE bsik-bldat,
            xblnr    LIKE bsik-xblnr,
            blart    LIKE bsik-blart,
            sgtxt    LIKE bsik-sgtxt,
            shkzg    LIKE bsik-shkzg,
            dmbtr    LIKE bsik-dmbtr,
            zfbdt    LIKE bsik-zfbdt,
            zbd1t    LIKE bsik-zbd1t,
            zbd2t    LIKE bsik-zbd2t,
            zbd3t    LIKE bsik-zbd3t,
            zuonr    LIKE bsik-zuonr,
          END OF inrect,
          BEGIN OF t_item OCCURS 1000,                          " 0001
            lifnr LIKE bsik-lifnr,
            belnr LIKE bsik-belnr,
            gjahr LIKE bsik-gjahr,
            bldat LIKE bsik-bldat,
            xblnr LIKE bsik-xblnr,
            blart LIKE bsik-blart,
            sgtxt LIKE bsik-sgtxt,
            zfbdt LIKE bsik-zfbdt,
            dmbtr LIKE bsik-dmbtr,
            days(3)  TYPE c,
            zuonr    LIKE bsik-zuonr,
          END OF t_item,
          t_line LIKE t_item OCCURS 1000 WITH HEADER LINE,      " 0001
          BEGIN OF itab OCCURS 1000,
            lifnr    LIKE lfa1-lifnr,
            total    LIKE bsik-dmbtr,
            zfuture  LIKE bsik-dmbtr,
            zcurrent LIKE bsik-dmbtr,
            crbal   LIKE bsik-dmbtr,
            30days   LIKE bsik-dmbtr,
            60days   LIKE bsik-dmbtr,
            90days   LIKE bsik-dmbtr,
            99days   LIKE bsik-dmbtr,
            120days  LIKE bsik-dmbtr,
            180days  LIKE bsik-dmbtr,
            365days  LIKE bsik-dmbtr,
            bzirk    LIKE knvv-bzirk,
            vkbur    LIKE knvv-vkbur,
            vwerk    LIKE knvv-vwerk,
            vkgrp    LIKE knvv-vkgrp,
            klimk    LIKE knkk-klimk,
            cashd    LIKE knkk-cashd,
            grupp    LIKE knkk-grupp,
            erdat    LIKE lfa1-erdat,
            name1    LIKE lfa1-name1,
            name2    LIKE lfa1-name2,
            stras    LIKE lfa1-stras,
            ort01    LIKE lfa1-ort01,
            telf1    LIKE lfa1-telf1,
            psort(10),
            sperr    LIKE lfa1-sperr,
            totsal   LIKE bsik-dmbtr,
            txt50    LIKE skat-txt50,
            gsber    LIKE bsik-gsber,
          END OF itab.
    DATA: sel_tab     TYPE TABLE OF rsparams WITH HEADER LINE,
          p_debit(1) TYPE c,
          p_credit(1) TYPE c.
    DATA: t_variant LIKE disvariant OCCURS 0 WITH HEADER LINE.
    parameters and select-options
    SELECTION-SCREEN BEGIN OF BLOCK blck0 WITH FRAME TITLE text-002.
    PARAMETERS: stida LIKE sy-datum DEFAULT sy-datum OBLIGATORY,
                p_bukrs LIKE t001-bukrs DEFAULT 'PIIL' MEMORY ID buk
    OBLIGATORY.
              P_BUKRS LIKE T001-BUKRS DEFAULT 'CC01' OBLIGATORY.  "0003
    SELECT-OPTIONS: s_lifnr   FOR bsik-lifnr ,
                   s_vkbur FOR knvv-vkbur,
                   s_vkgrp FOR knvv-vkgrp,
                   s_bzirk FOR knvv-bzirk,
                   s_konda FOR knvv-konda,
                   s_kdgrp FOR knvv-kdgrp NO-DISPLAY ,
                   s_kvgr2 FOR knvv-kvgr2 NO-DISPLAY ,
                   s_kkber FOR knkk-kkber NO-DISPLAY ,
                   s_grupp FOR knkk-grupp NO-DISPLAY ,
                   s_ctlpc FOR knkk-ctlpc,
                    s_akont FOR lfb1-akont,
                    s_gsber FOR bsik-gsber.
    PARAMETERS: p_future AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK blck0.
    SELECTION-SCREEN BEGIN OF BLOCK blck1 WITH FRAME TITLE text-002.
    PARAMETERS: p_abs RADIOBUTTON GROUP zrad,
                p_due RADIOBUTTON GROUP zrad DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK blck1.
    *SELECTION-SCREEN BEGIN OF BLOCK blck2 WITH FRAME TITLE text-003.
    *PARAMETERS: c_run RADIOBUTTON GROUP zrac DEFAULT 'X',
               c_blk RADIOBUTTON GROUP zrac,
               c_all RADIOBUTTON GROUP zrac.
    *SELECTION-SCREEN END OF BLOCK blck2.
    *SELECTION-SCREEN BEGIN OF BLOCK blck3 WITH FRAME TITLE text-004.
    *PARAMETERS: p_debit AS CHECKBOX DEFAULT 'X' ,
               p_credit AS CHECKBOX DEFAULT 'X' NO-DISPLAY,
    *selection-screen end of block blck3.
    start-of-selection.
    START-OF-SELECTION.
    PERFORM BUILD_EVENTCAT.
      p_debit = 'X'.
      p_credit = 'X'.
      PERFORM get_customer_invoices.
    filter records based on selection criteria
      PERFORM filter_records.
    END-OF-SELECTION.
      PERFORM add_sort_field.
      PERFORM modify_field.
      PERFORM write_report.
    *&      Form  FILTER_RECORDS
          To collect all the required data from DB and store them in
          internal table.
    -->  p1        text
    <--  p2        text
    FORM filter_records.
    delete records based on selection criteria
      LOOP AT itab.
       SELECT vkbur vkgrp vwerk erdat konda kdgrp bzirk kvgr2
         INTO (itab-vkbur, itab-vkgrp, itab-vwerk, knvv-erdat,
               knvv-konda, knvv-kdgrp,itab-bzirk,knvv-kvgr2)
         FROM knvv WHERE lifnr =  itab-lifnr
                   ORDER BY erdat DESCENDING.
    AKS :- Not Required for PI
         CASE itab-vkbur.
           WHEN 'SA1'.
             itab-vkbur = 'SF25'.
           WHEN 'QLD1'.
             itab-vkbur = 'SF23'.
           WHEN 'WA1'.
             itab-vkbur = 'SF26'.
         ENDCASE.
    AKS.
         EXIT.
       ENDSELECT.
       IF itab-vkbur IN s_vkbur AND
          itab-vkgrp IN s_vkgrp AND
          knvv-konda IN s_konda AND
          knvv-kdgrp IN s_kdgrp AND
          itab-bzirk IN s_bzirk AND
          knvv-kvgr2 IN s_kvgr2.
       ELSE.
         DELETE itab.
         CONTINUE.
       ENDIF.
       SELECT SINGLE klimk grupp cashd
         INTO (itab-klimk, itab-grupp, itab-cashd)
         FROM knkk WHERE lifnr =  itab-lifnr
                   AND   kkber IN s_kkber
                   AND   ctlpc IN s_ctlpc
                   AND   grupp IN s_grupp.
       IF SY-SUBRC NE 0.
         DELETE ITAB.
         CONTINUE.
       ENDIF.
        SELECT SINGLE skat~txt50
             INTO (itab-txt50)
             FROM lfb1 INNER JOIN skat
             ON lfb1akont EQ skatsaknr
             WHERE lfb1~lifnr =  itab-lifnr
                       AND   lfb1~akont IN s_akont
                       AND   skat~spras EQ 'EN'.
        IF sy-subrc NE 0.
          DELETE itab.
          CONTINUE.
        ENDIF.
        SELECT SINGLE name1 name2 telf1 erdat stras ort01 sperr
             INTO (itab-name1, itab-name2, itab-telf1,
                     itab-erdat, itab-stras, itab-ort01, itab-sperr )
               FROM lfa1
               WHERE lifnr =  itab-lifnr
        IF sy-subrc NE 0 .
          DELETE itab.
          CONTINUE.
        ENDIF.
    AKS For Filteration of Customer base on Block Area.
       IF c_all NE 'X'.
         IF c_run EQ 'X' AND itab-sperr EQ 'X'.
           DELETE itab.
           CONTINUE.
         ELSE.
           IF c_blk EQ 'X' AND itab-sperr NE 'X'.
             DELETE itab.
             CONTINUE.
           ENDIF.
         ENDIF.
       ENDIF.
        MODIFY itab.
      ENDLOOP.
    ENDFORM.                               " FILTER_RECORDS
    *&      Form  GET_CUSTOMER_INVOICES
          text
    -->  p1        text
    <--  p2        text
    FORM get_customer_invoices.
      DATA:ztotcre  LIKE bsik-dmbtr.
      DATA:ztotsal  LIKE bsik-dmbtr.
      DATA: fsdate LIKE sy-datum.
      DATA: l_perio(4) TYPE c.
      MOVE stida             TO rf140-stida.
      MOVE rf140-stida+4(2)  TO targ_month.
      MOVE rf140-stida+0(4)  TO targ_year.
      MOVE rf140-stida+6(2)  TO targ_days.
      targ_mth_abs           =  ( targ_year * 12 ) + targ_month.
      CALL FUNCTION 'ZGET_PERIOD_FROM_DATE'
        EXPORTING
          i_date  = stida
        IMPORTING
          e_perio = l_perio.
      CONCATENATE l_perio '0401' INTO fsdate.
    select open items.
      IF p_due EQ 'X'.
        SELECT lifnr belnr gjahr bldat xblnr blart sgtxt        " 0001
               shkzg dmbtr zfbdt zbd1t zbd2t zbd3t
               zuonr
          FROM bsik INTO TABLE inrect
          WHERE bukrs =  p_bukrs
          AND   budat LE stida
          AND   lifnr IN s_lifnr
          AND   gsber IN s_gsber
          AND   umskz NE 'T'
          AND   umskz NE 'F'
          AND   umskz NE 'R'
          AND   umskz NE 'P'
          AND   umskz NE 'J'
          AND umskz NE 'L'.
    LOOP AT INREC.
       IF INREC-SHKZG = 'H'.
         INREC-DMBTR  = INREC-DMBTR * -1.
       ENDIF.
       MOVE-CORRESPONDING INREC TO T_ITEM.                     " 0001
       PERFORM COLLECT_INVOICE USING   INREC-lifnr    INREC-DMBTR
                                       INREC-ZFBDT    INREC-ZBD1T
                                       INREC-ZBD2T    INREC-ZBD3T.
       APPEND T_ITEM.
       CLEAR T_ITEM.
    ENDLOOP.
        LOOP AT inrect.
          inrec-lifnr = inrect-lifnr.
          inrec-belnr    = inrect-belnr.
          inrec-gjahr    = inrect-gjahr.
          inrec-bldat    = inrect-bldat.
          inrec-xblnr    = inrect-xblnr.
          inrec-blart    = inrect-blart.
          inrec-sgtxt    = inrect-sgtxt.
          inrec-shkzg    = inrect-shkzg.
          inrec-dmbtr    = inrect-dmbtr.
          CALL FUNCTION 'NJ_CAL_DATE_IN_INTERVAL'
            EXPORTING
              date      = inrect-zfbdt
              days      = inrect-zbd1t
              months    = 00
              signum    = '+'
              years     = 00
            IMPORTING
              calc_date = inrec-zfbdt.
          inrec-zbd1t    = inrect-zbd1t.
          inrec-zbd2t    = inrect-zbd2t.
          inrec-zbd3t    = inrect-zbd3t.
          inrec-zuonr    = inrect-zuonr.
          APPEND inrec.
          CLEAR inrec.
        ENDLOOP.
      ELSE.
        SELECT lifnr belnr gjahr bldat xblnr blart sgtxt        " 0001
               shkzg dmbtr zfbdt zbd1t zbd2t zbd3t
               zuonr
          FROM bsik INTO TABLE inrec
          WHERE bukrs =  p_bukrs
          AND   budat LE stida
          AND   lifnr IN s_lifnr
          AND   gsber IN s_gsber
          AND   umskz NE 'T'
          AND   umskz NE 'F'
          AND   umskz NE 'R'
          AND   umskz NE 'P'
          AND   umskz NE 'J'
          AND umskz NE 'L'.
      ENDIF.
      SORT inrec BY lifnr shkzg zfbdt .
      LOOP AT inrec.
        AT NEW lifnr.
    For Customers Credit Balance Transaction to be display in Report
    End of Credit Balance
          ztotcre = 0.
          ztotsal = 0.
        ENDAT.
        IF inrec-shkzg = 'H'.
          inrec-dmbtr = inrec-dmbtr * -1.
          ztotcre = ztotcre + inrec-dmbtr.
        ELSE.
          IF inrec-blart = 'RV'.
            IF inrec-bldat GE fsdate.
              ztotsal = ztotsal + inrec-dmbtr.
            ENDIF.
          ENDIF.
          ztotcre = ztotcre +  inrec-dmbtr.
       endif.
          IF p_debit EQ 'X'.
            IF ztotcre > 0.
              MOVE-CORRESPONDING inrec TO t_item.               " 0001
              PERFORM collect_invoice USING inrec-lifnr    ztotcre
                                          inrec-zfbdt    inrec-zbd1t
                                          inrec-zbd2t    inrec-zbd3t
                                          ztotsal.
              APPEND t_item.
              CLEAR t_item.
              ztotcre = 0.
              ztotsal = 0.
            ENDIF.
          ENDIF.
        ENDIF.
        IF p_credit EQ 'X'.
         AT END OF lifnr.
          IF ztotcre < 0.
            MOVE-CORRESPONDING inrec TO t_item.                 " 0001
            PERFORM collect_invoice USING inrec-lifnr    ztotcre
                                        inrec-zfbdt       inrec-zbd1t
                                        inrec-zbd2t    inrec-zbd3t
                                        ztotsal.
            APPEND t_item.
            CLEAR t_item.
            ztotcre = 0.
            ztotsal = 0.
           APPEND t_item.
           CLEAR t_item.
          ENDIF.
         ENDAT.
        ENDIF.
      ENDLOOP.
    select cleared items
      IF p_due EQ 'X'.
        REFRESH inrect.  CLEAR inrect.
        SELECT lifnr belnr gjahr bldat xblnr blart sgtxt
               shkzg dmbtr zfbdt zbd1t zbd2t zbd3t
               zuonr
          FROM bsak INTO TABLE inrect
          WHERE bukrs =  p_bukrs
          AND   budat LE stida
          AND   augdt >  stida
          AND   lifnr IN s_lifnr
          AND   gsber IN s_gsber
        REFRESH inrec.  CLEAR inrec.
        LOOP AT inrect.
          inrec-lifnr = inrect-lifnr.
          inrec-belnr    = inrect-belnr.
          inrec-gjahr    = inrect-gjahr.
          inrec-bldat    = inrect-bldat.
          inrec-xblnr    = inrect-xblnr.
          inrec-blart    = inrect-blart.
          inrec-sgtxt    = inrect-sgtxt.
          inrec-shkzg    = inrect-shkzg.
          inrec-dmbtr    = inrect-dmbtr.
          CALL FUNCTION 'NJ_CAL_DATE_IN_INTERVAL'
            EXPORTING
              date      = inrect-zfbdt
              days      = inrect-zbd1t
              months    = 00
              signum    = '+'
              years     = 00
            IMPORTING
              calc_date = inrec-zfbdt.
          inrec-zbd1t    = inrect-zbd1t.
          inrec-zbd2t    = inrect-zbd2t.
          inrec-zbd3t    = inrect-zbd3t.
          inrec-zuonr    = inrect-zuonr.
          APPEND inrec.
          CLEAR inrec.
        ENDLOOP.
      ELSE.
        REFRESH inrec.  CLEAR inrec.
        SELECT lifnr belnr gjahr bldat xblnr blart sgtxt
               shkzg dmbtr zfbdt zbd1t zbd2t zbd3t
               zuonr
          FROM bsak INTO TABLE inrec
          WHERE bukrs =  p_bukrs
          AND   budat LE stida
          AND   augdt >  stida
          AND   lifnr IN s_lifnr
          AND   gsber IN s_gsber
      ENDIF.
      SORT inrec BY lifnr shkzg zfbdt .
      LOOP AT inrec.
        AT NEW lifnr.
          ztotcre = 0.
          ztotsal = 0.
        ENDAT.
        IF inrec-shkzg = 'H'.
          inrec-dmbtr = inrec-dmbtr * -1.
          ztotcre = ztotcre + inrec-dmbtr.
        ELSE.
          IF inrec-blart = 'RV'.
            IF inrec-bldat GE fsdate.
              ztotsal = ztotsal + inrec-dmbtr.
            ENDIF.
          ENDIF.
          ztotcre = ztotcre +  inrec-dmbtr.
      endif.
          IF p_debit EQ 'X'.
            IF ztotcre > 0.
              MOVE-CORRESPONDING inrec TO t_item.               " 0001
              PERFORM collect_invoice USING inrec-lifnr    ztotcre
                                          inrec-zfbdt    inrec-zbd1t
                                          inrec-zbd2t    inrec-zbd3t
                                          ztotsal.
              APPEND t_item.
              CLEAR t_item.
              ztotcre = 0.
              ztotsal = 0.
            ENDIF.
          ENDIF.
        ENDIF.
        IF p_credit EQ 'X'.
         AT END OF lifnr.
          IF ztotcre < 0.
            MOVE-CORRESPONDING inrec TO t_item.                 " 0001
            PERFORM collect_invoice USING inrec-lifnr    ztotcre
                                        inrec-zfbdt    inrec-zbd1t
                                        inrec-zbd2t    inrec-zbd3t
                                        ztotsal.
            APPEND t_item.
            CLEAR t_item.
            ztotcre = 0.
            ztotsal = 0.
           APPEND t_item.
           CLEAR t_item.
          ENDIF.
         ENDAT.                                                " 0001
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " GET_CUSTOMER_INVOICES
    *&      Form  COLLECT_INVOICE
          text
         -->P_bsik_lifnr  text
         -->P_bsik_DMBTR  text
         -->P_bsik_ZFBDT  text
         -->P_bsik_ZFBDT1  text
         -->P_bsik_ZFBDT2  text
         -->P_bsik_ZFBDT3  text
    FORM collect_invoice USING    pp_lifnr
                                  pp_dmbtr
                                  pp_zfbdt
                                  pp_zbd1t
                                  pp_zbd2t
                                  pp_zbd3t
                                  pp_ztotsal.
      doc_month            =  pp_zfbdt+4(2).
      doc_year             =  pp_zfbdt+0(4).
      doc_mth_abs          =  ( doc_year * 12 ) + doc_month.
      mth_result           =  ( targ_mth_abs    - doc_mth_abs ).
    logic given by Mr. Ashok Singhvi
      doc_days             =  pp_zfbdt+6(2).
      addl_days            =  ( doc_days  -  targ_days ).
      IF addl_days <= 0.
        ADD 1 TO mth_result.
      ENDIF.
      IF NOT pp_zbd3t IS INITIAL.
        MOVE pp_zbd3t TO ext_days.
      ELSEIF NOT pp_zbd2t IS INITIAL.
        MOVE pp_zbd2t TO ext_days.
      ELSEIF NOT pp_zbd1t IS INITIAL.
        MOVE pp_zbd1t TO ext_days.
      ELSE.
        CLEAR ext_days.
      ENDIF.
    CHECK with Andrew whether this is working or not
    if extended payment terms exist, subtract no of mths from mth_result
    IF NOT ext_days IS INITIAL.
       CASE ext_days.
         WHEN 30.
           SUBTRACT 1 FROM mth_result.
         WHEN 60.
           SUBTRACT 2 FROM mth_result.
         WHEN 90.
           SUBTRACT 3 FROM mth_result.
         WHEN 120.
           SUBTRACT 4 FROM mth_result.
       ENDCASE.
    ENDIF.
    change to key date
      IF pp_dmbtr > 0.
        IF p_future = 'X'.                                      " 0001
          IF mth_result      <= 0.
            itab-zcurrent    =  pp_dmbtr.
            t_item-days       = 'CUR'.
          ELSEIF mth_result  =  1.
            itab-30days      =  pp_dmbtr.
            t_item-days       = '30D'.
          ELSEIF mth_result  =  2.
            itab-60days      =  pp_dmbtr.
            t_item-days        = '60D'.
          ELSEIF mth_result  =  3.
            itab-90days      =  pp_dmbtr.
            t_item-days        = '90D'.
          ELSEIF mth_result  >  3 AND mth_result  <=  4 .
            itab-99days      =  pp_dmbtr.
            t_item-days        = '99D'.
          ELSEIF mth_result  >  4 AND mth_result  <=  6 .
            itab-120days      =  pp_dmbtr.
            t_item-days        = '120D'.
          ELSEIF mth_result  >  6 AND mth_result  <=  12 .
            itab-180days      =  pp_dmbtr.
            t_item-days        = '180D'.
          ELSEIF mth_result  >  12 .
            itab-365days      =  pp_dmbtr.
            t_item-days        = '365D'.
          ENDIF.
        ELSE.
          IF mth_result      < 0.
            itab-zfuture     =  pp_dmbtr.
            t_item-days       = 'FUT'.
          ELSEIF mth_result  = 0.
            itab-zcurrent = pp_dmbtr.
            t_item-days       = 'CUR'.
          ELSEIF mth_result  =  1.
            itab-30days      =  pp_dmbtr.
            t_item-days       = '30D'.
          ELSEIF mth_result  =  2.
            itab-60days      =  pp_dmbtr.
            t_item-days       = '60D'.
          ELSEIF mth_result  =  3.
            itab-90days      =  pp_dmbtr.
            t_item-days       = '90D'.
          ELSEIF mth_result  >  3 AND mth_result  <=  4 .
            itab-99days      =  pp_dmbtr.
            t_item-days        = '99D'.
          ELSEIF mth_result  >  4 AND mth_result  <=  6 .
            itab-120days      =  pp_dmbtr.
            t_item-days        = '120D'.
          ELSEIF mth_result  >  6 AND mth_result  <=  12 .
            itab-180days      =  pp_dmbtr.
            t_item-days        = '180D'.
          ELSEIF mth_result  >  12 .
            itab-365days      =  pp_dmbtr.
            t_item-days        = '365D'.
          ENDIF.
        ENDIF.                                                  " 0001
        itab-crbal         = 0.
        itab-total         = pp_dmbtr.
      ELSE.
        IF p_future = 'X'.                                      " 0001
          IF mth_result      <= 0.
            itab-zcurrent    =  pp_dmbtr.
            t_item-days       = 'CUR'.
          ELSEIF mth_result  =  1.
            itab-30days      =  pp_dmbtr.
            t_item-days       = '30D'.
          ELSEIF mth_result  =  2.
            itab-60days      =  pp_dmbtr.
            t_item-days        = '60D'.
          ELSEIF mth_result  =  3.
            itab-90days      =  pp_dmbtr.
            t_item-days        = '90D'.
          ELSEIF mth_result  >  3 AND mth_result  <=  4 .
            itab-99days      =  pp_dmbtr.
            t_item-days        = '99D'.
          ELSEIF mth_result  >  4 AND mth_result  <=  6 .
            itab-120days      =  pp_dmbtr.
            t_item-days        = '120D'.
          ELSEIF mth_result  >  6 AND mth_result  <=  12 .
            itab-180days      =  pp_dmbtr.
            t_item-days        = '180D'.
          ELSEIF mth_result  >  12 .
            itab-365days      =  pp_dmbtr.
            t_item-days        = '365D'.
          ENDIF.
        ELSE.
          IF mth_result      < 0.
            itab-zfuture     =  pp_dmbtr.
            t_item-days       = 'FUT'.
          ELSEIF mth_result  = 0.
            itab-zcurrent = pp_dmbtr.
            t_item-days       = 'CUR'.
          ELSEIF mth_result  =  1.
            itab-30days      =  pp_dmbtr.
            t_item-days       = '30D'.
          ELSEIF mth_result  =  2.
            itab-60days      =  pp_dmbtr.
            t_item-days       = '60D'.
          ELSEIF mth_result  =  3.
            itab-90days      =  pp_dmbtr.
            t_item-days       = '90D'.
          ELSEIF mth_result  >  3 AND mth_result  <=  4 .
            itab-99days      =  pp_dmbtr.
            t_item-days        = '99D'.
          ELSEIF mth_result  >  4 AND mth_result  <=  6 .
            itab-120days      =  pp_dmbtr.
            t_item-days        = '120D'.
          ELSEIF mth_result  >  6 AND mth_result  <=  12 .
            itab-180days      =  pp_dmbtr.
            t_item-days        = '180D'.
          ELSEIF mth_result  >  12 .
            itab-365days      =  pp_dmbtr.
            t_item-days        = '365D'.
          ENDIF.
        ENDIF.                                                  " 0001
        itab-total         = pp_dmbtr.
        itab-crbal         = 0.
      ENDIF.
      itab-lifnr         = pp_lifnr.
      itab-totsal        = pp_ztotsal.
      COLLECT itab.
      CLEAR itab.
    ENDFORM.                    " COLLECT_INVOICE
    *&      Form  ADD_SORT_FIELD
          text
    -->  p1        text
    <--  p2        text
    FORM add_sort_field.
      DATA: l_amount(9)  TYPE n.
      IF p_future = 'X'.
        LOOP AT itab.
          l_amount = 999999999.
          IF     itab-365days > 0.
            l_amount = l_amount - itab-365days.
            CONCATENATE 'A' l_amount INTO itab-psort.
          ELSEIF     itab-180days > 0.
            l_amount = l_amount - itab-180days.
            CONCATENATE 'B' l_amount INTO itab-psort.
          ELSEIF     itab-120days > 0.
            l_amount = l_amount - itab-120days.
            CONCATENATE 'C' l_amount INTO itab-psort.
          ELSEIF     itab-99days > 0.
            l_amount = l_amount - itab-99days.
            CONCATENATE 'D' l_amount INTO itab-psort.
          ELSEIF itab-90days > 0.
            l_amount = l_amount - itab-90days.
            CONCATENATE 'E' l_amount INTO itab-psort.
          ELSEIF itab-60days > 0.
            l_amount = l_amount - itab-60days.
            CONCATENATE 'F' l_amount INTO itab-psort.
          ELSEIF itab-30days > 0.
            l_amount = l_amount - itab-30days.
            CONCATENATE 'G' l_amount INTO itab-psort.
          ELSEIF itab-zcurrent > 0.
            l_amount = l_amount - itab-zcurrent.
            CONCATENATE 'H' l_amount INTO itab-psort.
        ELSEif itab-zfuture > 0.
          L_AMOUNT = L_AMOUNT - ITAB-zfuture.
          CONCATENATE 'F' L_AMOUNT INTO ITAB-PSORT.
          ELSE.
            l_amount = ABS( itab-total ).
            CONCATENATE 'I' l_amount INTO itab-psort.
          ENDIF.
          MODIFY itab.
        ENDLOOP.
      ELSE.
        LOOP AT itab.
          l_amount = 999999999.
          IF     itab-365days > 0.
            l_amount = l_amount - itab-365days.
            CONCATENATE 'A' l_amount INTO itab-psort.
          ELSEIF     itab-180days > 0.
            l_amount = l_amount - itab-180days.
            CONCATENATE 'B' l_amount INTO itab-psort.
          ELSEIF     itab-120days > 0.
            l_amount = l_amount - itab-120days.
            CONCATENATE 'C' l_amount INTO itab-psort.
          ELSEIF     itab-99days > 0.
            l_amount = l_amount - itab-99days.
            CONCATENATE 'D' l_amount INTO itab-psort.
          ELSEIF itab-90days > 0.
            l_amount = l_amount - itab-90days.
            CONCATENATE 'E' l_amount INTO itab-psort.
          ELSEIF itab-60days > 0.
            l_amount = l_amount - itab-60days.
            CONCATENATE 'F' l_amount INTO itab-psort.
          ELSEIF itab-30days > 0.
            l_amount = l_amount - itab-30days.
            CONCATENATE 'G' l_amount INTO itab-psort.
          ELSEIF itab-zcurrent > 0.
            l_amount = l_amount - itab-zcurrent.
            CONCATENATE 'H' l_amount INTO itab-psort.
          ELSEIF itab-zfuture > 0.
            l_amount = l_amount - itab-zfuture.
            CONCATENATE 'I' l_amount INTO itab-psort.
          ELSE.
            l_amount = ABS( itab-total ).
            CONCATENATE 'J' l_amount INTO itab-psort.
          ENDIF.
          MODIFY itab.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " ADD_SORT_FIELD
    *&      Form  WRITE_REPORT
          text
    -->  p1        text
    <--  p2        text
    FORM write_report.
      PERFORM build_fieldcat.
      PERFORM build_sortcat.
      PERFORM build_eventcat.
      PERFORM build_layout.
      PERFORM start_list_viewer.
    ENDFORM.                    " WRITE_REPORT
    *&      Form  BUILD_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcat.
    lifnr
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
      fieldcat_ln-ref_tabname        = 'lfa1'.
      fieldcat_ln-fieldname          = 'LIFNR'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-hotspot            = 'X'.
      fieldcat_ln-emphasize = 'C41'.
      APPEND fieldcat_ln TO fieldcat.
    Name1
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
      fieldcat_ln-ref_tabname        = 'lfa1'.
      fieldcat_ln-fieldname          = 'NAME1'.
      fieldcat_ln-emphasize = 'C41'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-seltext_l          = 'Name'.
      APPEND fieldcat_ln TO fieldcat.
    City Details
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
      fieldcat_ln-ref_tabname        = 'lfa1'.
      fieldcat_ln-fieldname          = 'ORT01'.
      fieldcat_ln-seltext_l          = 'City'.
      fieldcat_ln-col_pos            = col_pos.
      APPEND fieldcat_ln TO fieldcat.
    Credit Limit
    ADD 1 TO col_pos.
    CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'KNKK'.
    fieldcat_ln-fieldname          = 'KLIMK'.
    fieldcat_ln-col_pos            = col_pos.
    fieldcat_ln-emphasize = 'C41'.
    APPEND fieldcat_ln TO fieldcat.
    ADD 1 TO col_pos.
    CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'bsik'.
    fieldcat_ln-ref_fieldname      = 'DMBTR'.
    fieldcat_ln-fieldname          = 'CRBAL'.
    fieldcat_ln-col_pos            = col_pos.
    fieldcat_ln-emphasize = 'C41'.
    fieldcat_ln-do_sum             = 'X'.
    fieldcat_ln-seltext_l          = 'Cr. Bal.'.
    fieldcat_ln-seltext_m          = 'Cr. Bal.'.
    fieldcat_ln-seltext_s          = 'Cr. Bal.'.
    APPEND fieldcat_ln TO fieldcat.
    Total Amount
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
      fieldcat_ln-fieldname          = 'TOTAL'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-emphasize = 'C41'.
      fieldcat_ln-do_sum             = 'X'.
      fieldcat_ln-hotspot            = 'X'.
      fieldcat_ln-seltext_l          = 'Out.St.Amt.'.
      fieldcat_ln-seltext_m          = 'Out.St.Amt.'.
      fieldcat_ln-seltext_s          = 'Out.St.Amt.'.
      fieldcat_ln-ref_tabname        = 'zbsik'.
      fieldcat_ln-ref_fieldname      = 'ZDMBTR'.
      APPEND fieldcat_ln TO fieldcat.
      IF p_future NE 'X'.
    Future
        ADD 1 TO col_pos.
        CLEAR fieldcat_ln.
       fieldcat_ln-ref_tabname        = 'bsik'.
       fieldcat_ln-ref_fieldname      = 'DMBTR'.
        fieldcat_ln-fieldname          = 'ZFUTURE'.
        fieldcat_ln-col_pos            = col_pos.
        fieldcat_ln-do_sum             = 'X'.
        fieldcat_ln-hotspot            = 'X'.
        fieldcat_ln-emphasize = 'C41'.
        fieldcat_ln-seltext_l          = 'Future Due'.
        fieldcat_ln-seltext_m          = 'Future Due'.
        fieldcat_ln-seltext_s          = 'Future Due'.
        APPEND fieldcat_ln TO fieldcat.
      ENDIF.
    Current
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'bsik'.
    fieldcat_ln-ref_fieldname      = 'DMBTR'.
      fieldcat_ln-fieldname          = 'ZCURRENT'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-do_sum             = 'X'.
      fieldcat_ln-hotspot            = 'X'.
      fieldcat_ln-emphasize = 'C41'.
      fieldcat_ln-seltext_l          = 'Normal Due'.
      fieldcat_ln-seltext_m          = 'Normal Due'.
      fieldcat_ln-seltext_s          = 'Normal Due'.
      APPEND fieldcat_ln TO fieldcat.
    30 Days
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'bsik'.
    fieldcat_ln-ref_fieldname      = 'DMBTR'.
      fieldcat_ln-fieldname          = '30DAYS'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-do_sum             = 'X'.
      fieldcat_ln-hotspot            = 'X'.
      fieldcat_ln-emphasize = 'C41'.
      fieldcat_ln-seltext_l          = '0-30 Days'.
      fieldcat_ln-seltext_m          = '0-30 Days'.
      fieldcat_ln-seltext_s          = '0-30 Days'.
      APPEND fieldcat_ln TO fieldcat.
    60 Days
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'bsik'.
    fieldcat_ln-ref_fieldname      = 'DMBTR'.
      fieldcat_ln-fieldname          = '60DAYS'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-do_sum             = 'X'.
      fieldcat_ln-hotspot            = 'X'.
      fieldcat_ln-emphasize = 'C41'.
      fieldcat_ln-seltext_l          = '31-60 Days'.
      fieldcat_ln-seltext_m          = '31-60 Days'.
      fieldcat_ln-seltext_s          = '31-60 Days'.
      APPEND fieldcat_ln TO fieldcat.
    90 Days
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'bsik'.
    fieldcat_ln-ref_fieldname      = 'DMBTR'.
      fieldcat_ln-fieldname          = '90DAYS'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-do_sum             = 'X'.
      fieldcat_ln-hotspot            = 'X'.
      fieldcat_ln-emphasize = 'C41'.
      fieldcat_ln-seltext_l          = '61-90 Days'.
      fieldcat_ln-seltext_m          = '61-90 Days'.
      fieldcat_ln-seltext_s          = '61-90 Days'.
      APPEND fieldcat_ln TO fieldcat.
    99 Days
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'bsik'.
    fieldcat_ln-ref_fieldname      = 'DMBTR'.
      fieldcat_ln-fieldname          = '99DAYS'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-do_sum             = 'X'.
      fieldcat_ln-hotspot            = 'X'.
      fieldcat_ln-emphasize = 'C41'.
      fieldcat_ln-seltext_l          = '91-120 Days'.
      fieldcat_ln-seltext_m          = '91-120 Days'.
      fieldcat_ln-seltext_s          = '91-120 Days'.
      APPEND fieldcat_ln TO fieldcat.
    *120Days
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'bsik'.
    fieldcat_ln-ref_fieldname      = 'DMBTR'.
      fieldcat_ln-fieldname          = '120DAYS'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-do_sum             = 'X'.
      fieldcat_ln-hotspot            = 'X'.
      fieldcat_ln-emphasize = 'C41'.
      fieldcat_ln-seltext_l          = '121-180 Days'.
      fieldcat_ln-seltext_m          = '121-180 Days'.
      fieldcat_ln-seltext_s          = '121-180 Days'.
      APPEND fieldcat_ln TO fieldcat.
    *180 Days
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'bsik'.
    fieldcat_ln-ref_fieldname      = 'DMBTR'.
      fieldcat_ln-fieldname          = '180DAYS'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-do_sum             = 'X'.
      fieldcat_ln-hotspot            = 'X'.
      fieldcat_ln-emphasize = 'C41'.
      fieldcat_ln-seltext_l          = '181-365 Days'.
      fieldcat_ln-seltext_m          = '181-365 Days'.
      fieldcat_ln-seltext_s          = '181-365 Days'.
      APPEND fieldcat_ln TO fieldcat.
    *365 Days
      ADD 1 TO col_pos.
      CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'bsik'.
    fieldcat_ln-ref_fieldname      = 'DMBTR'.
      fieldcat_ln-fieldname          = '365DAYS'.
      fieldcat_ln-col_pos            = col_pos.
      fieldcat_ln-do_sum             = 'X'.
      fieldcat_ln-hotspot            = 'X'.
      fieldcat_ln-emphasize = 'C41'.
      fieldcat_ln-seltext_l          = '>365 Days'.
      fieldcat_ln-seltext_m          = '>365 Days'.
      fieldcat_ln-seltext_s          = '>365 Days'.
      APPEND fieldcat_ln TO fieldcat.
    Last Payment Date
    ADD 1 TO col_pos.
    CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'KNKK'.
    fieldcat_ln-fieldname          = 'CASHD'.
    fieldcat_ln-col_pos            = col_pos.
    APPEND fieldcat_ln TO fieldcat.
    Street Name
    ADD 1 TO COL_POS.
    CLEAR FIELDCAT_LN.
    FIELDCAT_LN-REF_TABNAME        = 'lfa1'.
    FIELDCAT_LN-FIELDNAME          = 'STRAS'.
    FIELDCAT_LN-COL_POS            = COL_POS.
    APPEND FIELDCAT_LN TO FIELDCAT.
    Telephone
    ADD 1 TO COL_POS.
    CLEAR FIELDCAT_LN.
    FIELDCAT_LN-REF_TABNAME        = 'lfa1'.
    FIELDCAT_LN-FIELDNAME          = 'TELF1'.
    FIELDCAT_LN-COL_POS            = COL_POS.
    APPEND FIELDCAT_LN TO FIELDCAT.
    Credit Group
    ADD 1 TO COL_POS.
    CLEAR FIELDCAT_LN.
    FIELDCAT_LN-REF_TABNAME        = 'KNKK'.
    FIELDCAT_LN-FIELDNAME          = 'GRUPP'.
    FIELDCAT_LN-COL_POS            = COL_POS.
    APPEND FIELDCAT_LN TO FIELDCAT.
    *Sales District
    ADD 1 TO col_pos.
    CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'KNVV'.
    fieldcat_ln-fieldname          = 'BZIRK'.
    fieldcat_ln-col_pos            = col_pos.
    fieldcat_ln-seltext_l          = 'S_Distt'.
    fieldcat_ln-seltext_m          = 'S_Distt'.
    fieldcat_ln-seltext_s          = 'S_Distt'.
    APPEND fieldcat_ln TO fieldcat.
    Sales Office
    ADD 1 TO col_pos.
    CLEAR fieldcat_ln.
    fieldcat_ln-ref_tabname        = 'KNVV'.
    fieldcat_ln-fieldname          = 'VKBUR'.
    fieldcat_ln-col_pos            = col_pos.
    fieldcat_ln-seltext_l          = 'S_Off'.
    fieldcat_ln-seltext_m          = 'S_Off'.
    fieldcat_ln-seltext_s          = 'S_Off'.
    APPEND fieldcat_ln TO fieldcat.
    Cust Creat Date
    ADD 1 TO COL_POS.
    CLEAR FIELDCAT_LN.
    FIELDCAT_LN-REF_TABNAME        = 'lfa1'.
    FIELDCAT_LN-FIELDNAME          = 'ERDAT'.
    FIELDCAT_LN-COL_POS            = COL_POS.
    APPEND FIELDCAT_LN TO FIELDCAT.

  • User defined Metadata for XML DB using Java API

    I have been looking through and reading the documentation for Oracle XML DB. I am trying to find out if there is a way to create user define metadata using a Java API. when I look in the XML "Java API Reference (Javadoc)" setProperty(java.lang.String name, java.lang.String value, int type) it states: Sets the specified (single-value) property to the specified value. If the property does not yet exist, it is created. I have tried several ways to do this and have not been successful. I have looked for java examples in the XML DB Developer's Guide, XML Developer's Kit Programmer's Guide.
    Is there a good example out there as to how to create user-defined metadata that can be populated using the JCR API.
    Thanks in advance.

    We need to create the 2 xml schemas, one for request and the other for response of selected operation in the WSDL.
    This we need to do dynamically. There will not be any java classes generated, the xsd files need to be created on the fly.
    Please suggest xml schema creation in this sequence.

  • Need sample code for using BCONTACT object in ABAP

    Hello All,
    This is going to be my very first venture into the realm of OO / ABAP programming. And what venture it will be! I've been assigned the task of modifying an ABAP program so that it uses the BCONTACT object in order to create a contact.
    Now, I need to see how it is done in other programs. What data elements or attributes do I need to set? How do I set or populate them? Anything else that goes with it?
    So, any idea where I can find such code?
    Your help is greatly appreciated.

    After much back and forth the following code did the job for me. Obviously, you have to make sure that you have the right objrole and objtype and other values which relate to your screen elements (whatever screen you are using). Hope this helps.
    *&      Form  create contact
    FORM create_contact.
            contact creation
      REFRESH t_objects.
      w_objects-objrole      = 'DEFAULT'.              
      w_objects-OBJTYPE      = 'ISUSMORDER'.
    w_objects-objtype      = 'BUS2007'.
      w_objects-objkey       = t_zisu_let_ot-auftrag.
      APPEND w_objects       TO t_objects.
      w_bcontd-ctype         = '003'.
      w_bcontd-cclass        = '1800'.
      w_bcontd-activity      = '0004'.
      w_bcontd-f_coming      = '2'.
      w_bcontd-origin        = '1'.
      w_bcontd-addinfo       = '  '.
      w_bcontd-priority      = '01'.
      w_bcontd-custinfo      = '  '.
      w_auto-bcontd          = w_bcontd.
      w_auto-bcontd_use      = 'X'.
      w_auto-bcontd_okcode   = 'SAVE'.
      w_auto-iobjects        = t_objects.
      CALL FUNCTION 'BCONTACT_CREATE'
        EXPORTING
          x_upd_online    = 'X'
          x_no_dialog     = 'X'
          x_auto          = w_auto
          x_prgcontext    = sy-repid
          x_subcontext    = ' '
          x_bpcconfig     = ' '
          x_partner       = w_partner
          x_altpartner    = ' '
          x_pcategory     = ' '
        IMPORTING
          y_new_bpcontact = w_bpcontact
        EXCEPTIONS
          existing        = 1
          foreign_lock    = 2
          number_error    = 3
          general_fault   = 4
          input_error     = 5
          not_authorized  = 6
          OTHERS          = 7.
      IF sy-subrc = 0.
        WRITE: / 'Contact ', w_bpcontact, 'a été créé'.
      ELSE.
        CASE sy-subrc.
          WHEN 1.
            WRITE: / '…’.
          WHEN 2.
            WRITE: / '…’.
          WHEN 3.
          WHEN 4.
          WHEN 5.
          WHEN 6.
          WHEN 7.
          WHEN OTHERS.
        ENDCASE.
      ENDIF.
      COMMIT WORK.
    ENDFORM.                    " create_contact

  • Need sample code for component programming

    I see samples page here:
    /docs/DOC-8061#61
    want to download "Web Dynpro Component Interface Definitions in Practice" sample, but only empty folders structure provided in download link.
    ("zip file" link )
    How to get full sample project according whay is written on this page?
    May be someone have this or like this sample ?
    (with some description than)
    I need to develop such type of application
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f07c3625-c971-2910-3a9c-ce131487f82c
    components, component interface usage, also for GP, but do not see code samples for this.
    Can you help with it?
    thanks
    Edited by: Vladimir Grigoryev on Aug 7, 2008 10:01 AM

    Hallo Vladimir,
    sorry me, but I have absolutely no idea what your problem really is. I provided you with all required information to download, import, build, deploy and run my Web Dynpro Java Sample application on "Component Interface Definitions in Practice". This material is enriched with in-depth technical documentation on the underlying concepts (you already linked to all these resources in the initial message of this thread; your second link is pointing to my powerpoint presentation on this sampel) to answer your last message about "but code is not sufficient".
    PLEASE read the [Readme.txt|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0e4528f-c471-2910-66a0-dd459f975dc2] file to successfully install the local Web Dynpro DCs comprising the sample application metadata.
    NOTE: This sample is based on SAP NetWeaver 7.0, NOT on NetWeaver CE 7.1!!!
    I do not want to repeat all my descriptions in this mail thread.
    Regards, Bertram

  • Does any one have a sample code for sending email using IMAP ?

    Hi
    thank you for reading my post
    I have tried to use SMTP and because of some problems i could not use it and i must use Imap (authentication required)
    here is my SMTP code , does any one know how i can tune it to use Imap , or has a code snippet to send email using Imap ?
    thanks
    private static void postMail(String[] recipients, String subject, String message,
                             String from) throws MessagingException {
            boolean debug = false;
            class SMTPAuthenticator extends javax.mail.Authenticator
                    public PasswordAuthentication getPasswordAuthentication()
                        return new PasswordAuthentication(mail_usrname,mail_password);
            //Set the host smtp address
            Properties props = new Properties();
            FileInputStream fis;
            try {
                System.out.println("Loading property file");
                fis = new FileInputStream(new File("c:/email.properties"));
                props.load(fis);
                System.out.println("property file done");
            } catch (FileNotFoundException e) {
                System.out.println("file not found");
                e.printStackTrace();
            } catch (IOException e) {
                System.out.println("can not read properties file");
                e.printStackTrace();
            /*props.put("mail.smtp.user", mail_usrname);
    props.put("mail.smtp.host", smtpHost);
    props.put("mail.smtp.port", smtpPort);
    props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.socketFactory.port", smtpPort);
            // create some properties and get the default Session
            Authenticator auth = new SMTPAuthenticator();
            Session session = Session.getDefaultInstance(props, null);
            session.setDebug(debug);
            // create a message
            Message msg = new MimeMessage(session);
            // set the from and to address
            InternetAddress addressFrom = new InternetAddress(from);
            msg.setFrom(addressFrom);
            InternetAddress[] addressTo = new InternetAddress[recipients.length];
            for (int i = 0; i < recipients.length; i++) {
                addressTo[i] = new InternetAddress(recipients);
    msg.setRecipients(Message.RecipientType.TO, addressTo);
    // Setting the Subject and Content Type
    msg.setSubject(subject);
    msg.setContent(message, "text/HTML");
    System.out.println(msg.toString());
    Transport.send(msg);

    Please try this out!!!!!!!!!
    You can send emails using Outlook also. You can send email over Microsoft Exchange with this object (or another email server, using IMAP/POP).
    Sub SendMailOutlook(aTo, Subject, TextBody, aFrom)
    'Create an Outlook object
    Dim Outlook 'As New Outlook.Application
    Set Outlook = CreateObject("Outlook.Application")
    'Create e new message
    Dim Message 'As Outlook.MailItem
    Set Message = Outlook.CreateItem(olMailItem)
    With Message
    'You can display the message To debug And see state
    '.Display
    .Subject = Subject
    .Body = TextBody
    'Set destination email address
    .Recipients.Add (aTo)
    'Set sender address If specified.
    Const olOriginator = 0
    If Len(aFrom) > 0 Then .Recipients.Add(aFrom).Type = olOriginator
    'Send the message
    .Send
    End With
    End Sub

  • Adding a listener to Active directory for user creation using Java

    Hi,
    I would like to add a listener to active directory such that when a user is created to the "Users" container, I should be notified or informed. I would like to do this with Java. What should I do ?
    Regards,
    Anand Kumar D

    You should add a NamingListener or a NamespaceChangedListener.

  • Need Sample Code for Form-based Authentication

    Hello.
    I'm trying to setup Form-based Authentication. I keep reading the same (limited) documentation about putting this in your server's .xml files:
    <form method="POST" action="j_security_check">
            <input type="text" name="j_username">
            <input type="password" name="j_password">
    </form>I don't even have a web.xml or sun-web.xml file. I cannot find examples of Sun One WS either.
    Any sample coding - including yoru web.xml, sun-web.xml - would be greatly appeciated.
    Thanks!
    Sam

    Refer http://docs.sun.com/source/817-1833-10/pwadeply.html#wp40541

  • Req. Sample code for the Updation of Master record in MDM using Java API..

    Hi All,
    Can anyone provide me the same code for Updation of master record in MDM using Java API ??

    Hi SakthiNarayananD,
    You can additionally go through the following links to work with MDM and Java API:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49  (Java API)
    http://help.sap.com/javadocs/MDM/SP05/(Java api programs)
    https://help.sap.com/javadocs/MDM/current/index.html  (java api codes)
    http://help.sap.com/javadocs/MDM/SP06P2/index.html (Java Docs for SP06)
    Reg: Using JAVA API - Search
    Re: Retrieving Drop Down List Value using JAVA API - Lookup values
    How to retreive records from Lookuptable of type flat - Lookup Values
    Reg: MDM with webdynpro - READ,INSERT,MODIFY
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Code For Delta Extraction Using Function Module

    Dear Experts,
    I want a sample code for Delta Extraction using Function Module ( If it is customized already working code very helpful ), I have already created Function Module but Full update is happening. If I give delta update again it is retrieving all records. It is very urgent, if you have please send me to the following mail ID.
    [email protected]
    Best Regards,
    SGK.

    Dear KJ,
    Thank for your response. I saw the code that you sent, you have used some ztables like ZSC_DELTA_IP, ZSC_SAFETY_DELTA, ZSC_SET_EXT_TIME
    What are the fields that you have created in these tables , what is use of these tables, can you send the fields that you have used in these tables.
    Thanks & Regards,
    SGK

  • Create group in OID using java api

    Hi all!
    I need to create group in OID using java api. Java api documentation contains examples for creating users but not for groups. I search oracle.com (and google) and didn't find any hint.
    Anybody know the way?
    thank you.

    Andrew,
    a group is created like any other entry in OID. You need to specify the dn, objectclass(es) and (mandatory) attributes.
    e.g.
    objectclass=groupOfUniqueNames
    with
    uniquemember=cn=orcladmin, cn=Users, dc=de,dc=oracle,dc=com
    as an example take a look at
    cn=iASAdmins, cn=Groups,cn=OracleContext,dc=de,dc=oracle,dc=com
    to see the schema (data) for groupofuniquenames you can either use ODM or query the directory server
    ldapsearch -p 3060 -b "cn=subschemasubentry" -s base "objectclass=*"
    regards,
    --Olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Need sample code with RV_INVOICE_CREATE used

    Hi everybody!
    I need sample code with RV_INVOICE_CREATE or similar FMs used.
    The thing is that I do not know how to populate parametres of this and other invoicing FMs....
    For example, there are some tables to be passed to RV_INVOICE_CREATE
         TABLES
              XKOMFK     = XKOMFK
              XKOMV       = XKOMV
              XTHEAD      = XTHEAD
              XVBFS        = XVBFS
              XVBPA        = XVBPA
              XVBRK        = XVBRK
              XVBRP        = XVBRP
              XVBSS        = XVBSS
    How to populate them? I mean how to fill them with needed values?
    Useful answers will be awarded.
    Kind regards, M.

    RV_INVOICE_CREATE is the function module to create invoice based on delivery .
    when you pass delivery number ,it will create invoice ,see the invoice number in vf02,vf03 transaction. and also see the data vbrk,vbrp tables
    I have done this development and i have cancelled invoice,reverse goods issue,updated the delivery and again i am createing invoice..see the below progrm to get better understanding.
    REPORT ZWM_OVERWEIGHT_FIX  no standard page heading
                               message-id zwm.
    ======================================================================
    Program Name : ZWM_OVERWEIGHT_FIX                                    *
    Description  : Tool to fix Overweight in delivery line item,         *
                   Used All Function module to cancel invoice ,          *
                   Reverse the goods issue  ,Update Delivery qty,Create  *
                   invoice                                               *
    Author       : Seshu                                                 *
    Date         : 05/08/2007                                            *
    MODIFICATION HISTORY                                                 *
    DATE    | AUTHOR   | CHANGE #   | DESCRIPTION OF MODIFICATION        *
    --|||--
    05/08/07| Seshu    | DEVK921979 | Initial                            *
    D A T A - D E C L A R A T I O N     *******************
    Tables
    Tables : vbak,
             vbap,
             vbfa,
             likp,
             lips,
             vbrk,
             vbrp.
    Internal Tables
    data : i_lips like lips occurs 0 with header line,
           i_vbap like vbap occurs 0 with header line.
    Variables
    data : v_deliv like vbfa-vbelv,
           v_invoic like vbfa-vbelv.
    Data Declaration Part for Post Goods Issue
    DATA: l_vbeln LIKE likp-vbeln,
          l_vbkok LIKE vbkok,
          i_prot LIKE prott OCCURS 0 WITH HEADER LINE,
          ef_error_any_0 TYPE c,
          ef_error_in_item_deletion_0 TYPE c,
          ef_error_in_pod_update_0 TYPE c,
          ef_error_in_interface_0 TYPE c,
          ef_error_in_goods_issue_0 TYPE c,
          ef_error_in_final_check_0 TYPE c,
          d_return   LIKE bapireturn1.
    Internal tables for BAPI Function Module
    data : i_cret like BAPIRETURN1 occurs 0 with header line,
           i_csucess like BAPIVBRKSUCcESS occurs 0 with header line,
           i_ret2 like bapiret2 ,
           flag type c,
           i_mesg like mesg occurs 0 with header line.
    Data Declaration for Invoice Creation
    DATA: VBSK_I     LIKE  VBSK.
    data: d_success  type  c.
    DATA: XKOMFK LIKE      KOMFK   OCCURS 0 WITH HEADER LINE,
          XKOMV  LIKE      KOMV    OCCURS 0 WITH HEADER LINE,
          XTHEAD LIKE      THEADVB OCCURS 0 WITH HEADER LINE,
          XVBFS  LIKE      VBFS    OCCURS 0 WITH HEADER LINE,
          XVBPA  LIKE      VBPAVB  OCCURS 0 WITH HEADER LINE,
          XVBRK  LIKE      VBRKVB  OCCURS 0 WITH HEADER LINE,
          XVBRP  LIKE      VBRPVB  OCCURS 0 WITH HEADER LINE,
          XVBSS  LIKE      VBSS    OCCURS 0 WITH HEADER LINE,
          XKOMFKGN LIKE    KOMFKGN OCCURS 0 WITH HEADER LINE.
    S E L E C T I O N  -  S C R E E N   ******************
    Selection-screen
    Selection-screen : begin of block blk with frame title text-001.
    parameters : p_vbeln like vbak-vbeln obligatory.
    selection-screen : end of block blk.
    A T -  S E L E C T I O N  - S C R E E N ***************
    Validation on Sales order
    at selection-screen on p_vbeln.
    Check the data on VBAK Table
      select single vbeln from vbak into vbak-vbeln
                                where vbeln = p_vbeln.
      if sy-subrc ne 0.
        message e006 with p_vbeln.
      endif.
    S T A R T  - O F - S E L E C T I O N *******************
    Start-of-selection.
      break sreddy.
    Get the Invoice Number corresponding Sales Order Number
      perform get_invoice.
    Step 1.
    Cancel the Invoice  - Transaction VF11
      perform cancel_invoice.
    Reverse the goods issue
      perform reverse_goodsissue.
    Get the Order and Delivery Items
      perform get_sales_deliv.
    Delivery Change
      perform Delivery_change.
    Create Invoice document
      perform invoice_create.
    E N D  -  O F -  S E L E C T I O N  *******************
    end-of-selection.
    if flag = 'X'.
    message i012 with p_vbeln.
    endif.
    *&      Form  get_invoice
          Get Invoice Number
    FORM get_invoice.
    Clear Variables
      clear : v_deliv,
              v_invoic,
              flag.
    Get the Delivery Number First
      select single vbeln from vbfa into v_deliv
                               where vbelv = p_vbeln
                               and   vbtyp_n = 'J'.
      if sy-subrc ne 0.
        message i004 with p_vbeln.
        stop.
      endif.
    Get the Invoice Number
      select single vbeln from vbfa into v_invoic
                               where vbelv = p_vbeln
                               and   vbtyp_n = 'M'.
      if sy-subrc ne 0.
        message i003 with p_vbeln.
        stop.
      endif.
    ENDFORM.                    " get_invoice
    *&      Form  cancel_invoice
          Cancel the Invoice
    FORM cancel_invoice.
      clear : i_ret2,
              i_cret,
              i_csucess.
      refresh : i_cret,
                i_csucess.
      CALL FUNCTION 'BAPI_BILLINGDOC_CANCEL1'
        EXPORTING
          BILLINGDOCUMENT       = v_invoic
      TESTRUN               =
      NO_COMMIT             =
      BILLINGDATE           =
        TABLES
          RETURN                = i_cret
          SUCCESS               = i_csucess
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
                WAIT   = space
           IMPORTING
                RETURN = i_ret2.
    read table i_cret with key type = 'E'.
      if sy-subrc ne 0.
        message i005 with v_invoic.
        stop.
      endif.
    ENDFORM.                    " cancel_invoice
    *&      Form  reverse_goodsissue
          Reverse the goods Issue
    FORM reverse_goodsissue.
    Local Variable
      data : lv_vbtyp like likp-vbtyp.
      clear : i_mesg,
              lv_vbtyp.
      refresh : i_mesg.
      select single vbtyp from likp into lv_vbtyp
                               where vbeln = v_deliv.
      CALL FUNCTION 'WS_REVERSE_GOODS_ISSUE'
        EXPORTING
          I_VBELN                         = v_deliv
          I_BUDAT                         = sy-datum
        I_COUNT                         =
        I_MBLNR                         =
        I_TCODE                         =
          I_VBTYP                         = lv_vbtyp
        TABLES
          T_MESG                          = i_mesg
       EXCEPTIONS
         ERROR_REVERSE_GOODS_ISSUE       = 1
         OTHERS                          = 2
      if sy-subrc ne 0.
        message i007 with v_deliv.
      endif.
    ENDFORM.                    " reverse_goodsissue
    *&      Form  get_sales_deliv
          Get the Sales order and Deliv Items
    FORM get_sales_deliv.
    Local Variables
      data : lv_kwmeng like vbap-kwmeng.
      clear : i_lips,
              i_vbap.
      refresh : i_lips,
                i_vbap.
    Select the data from LIPS
      select * from lips into table i_lips
                         where vbeln = v_deliv.
      if sy-subrc ne 0.
        message i008 with v_deliv.
        stop.
      endif.
      sort i_lips by vbeln posnr.
      Get the Sales order Item Data.
      select * from vbap into table i_vbap
                              where vbeln = p_vbeln.
      if sy-subrc ne 0.
        message i006 with p_vbeln.
        stop.
      endif.
      sort i_vbap by vbeln posnr.
    Compare delivery Item and Order Items
      loop at i_lips.
        clear lv_kwmeng.
        read table i_vbap with key posnr = i_lips-posnr.
        if sy-subrc eq 0.
          lv_kwmeng = i_vbap-kwmeng * 2.
          if lv_kwmeng >= i_lips-lfimg.
            i_lips-lfimg = i_vbap-kwmeng.
            modify i_lips.
          endif.
        endif.
      endloop.
    ENDFORM.                    " get_sales_deliv
    *&      Form  Delivery_change
          Delivery Update
    FORM Delivery_change.
      Clear : i_prot.
      refresh : i_prot.
    Delivery Update
      CALL FUNCTION 'LE_MOB_DELIVERY_UPDATE'
           EXPORTING
                do_commit                = 'X'
           TABLES
                t_delivery_items         = i_lips
                prot                     = i_prot
           EXCEPTIONS
                conversion_overflow      = 1
                essential_data_missing   = 2
                error                    = 3
                nothing_to_update        = 4
                lock_after_update_failed = 5
                error_in_delivery_update = 6
                OTHERS                   = 7.
      COMMIT WORK.
      IF sy-subrc <> 0.
        MESSAGE i009 with v_deliv.
      endif.
    Post Goods Issue
      CLEAR:    d_return,
                i_prot,
                l_vbeln,
                l_vbkok.
      REFRESH i_prot.
      CLEAR:  ef_error_in_item_deletion_0    ,
              ef_error_in_pod_update_0       ,
              ef_error_in_interface_0        ,
              ef_error_in_goods_issue_0      ,
              ef_error_in_final_check_0      .
    carry out goods issue
      l_vbeln          = v_deliv.
      l_vbkok-vbeln_vl = l_vbeln.
      l_vbkok-wabuc    = 'X'.
    carry out goods issue
      l_vbeln          = v_deliv.
      l_vbkok-vbeln_vl = l_vbeln.
      l_vbkok-wabuc    = 'X'.
    SET UPDATE TASK LOCAL.
      CALL FUNCTION 'WS_DELIVERY_UPDATE'
           EXPORTING
                vbkok_wa                    = l_vbkok
                synchron                    = 'X'
                no_messages_update          = ' '
                update_picking              = 'X'
                commit                      = 'X'
                delivery                    = l_vbeln
                nicht_sperren               = 'X'
                if_error_messages_send_0    = space
           IMPORTING
                ef_error_any_0              = ef_error_any_0
                ef_error_in_item_deletion_0 = ef_error_in_item_deletion_0
                ef_error_in_pod_update_0    = ef_error_in_pod_update_0
                ef_error_in_interface_0     = ef_error_in_interface_0
                ef_error_in_goods_issue_0   = ef_error_in_goods_issue_0
                ef_error_in_final_check_0   = ef_error_in_final_check_0
           TABLES
                prot                        = i_prot
           EXCEPTIONS
                error_message               = 1
                OTHERS                      = 2.
      if sy-subrc ne 0.
        message i010 with v_deliv.
      else.
        COMMIT WORK .
      endif.
    ENDFORM.                    " Delivery_change
    *&      Form  invoice_create
          Invoice Creation
    FORM invoice_create.
      refresh: XKOMFK, XKOMV,
               XTHEAD, XVBFS,
               XVBPA,  XVBRK,
               XVBRP,  XVBSS.
      clear  : XKOMFK, XKOMV,
               XTHEAD, XVBFS,
               XVBPA,  XVBRK,
               XVBRP,  XVBSS,
               VBSK_I.
      VBSK_I-SMART = 'F'.
      XKOMFK-VBELN =  v_deliv.
      XKOMFK-VBTYP = 'J'.
      APPEND XKOMFK.
      CALL FUNCTION 'RV_INVOICE_CREATE'
           EXPORTING
                VBSK_I       = VBSK_I
                WITH_POSTING = 'C'
           TABLES
                XKOMFK       = XKOMFK
                XKOMV        = XKOMV
                XTHEAD       = XTHEAD
                XVBFS        = XVBFS
                XVBPA        = XVBPA
                XVBRK        = XVBRK
                XVBRP        = XVBRP
                XVBSS        = XVBSS.
      if sy-subrc eq 0.
        COMMIT WORK.
       flag = 'X'.
      else.
      message i011 with p_vbeln.
      endif.
    ENDFORM.                    " invoice_create
    Reward Points if it is helpful
    Thanks
    Seshu

Maybe you are looking for

  • Request parameter are not stored in database through Java Bean

    Hi, I want to store the request parameter in database through Java Bean.Allthough program are properly run but value are not store in DB. Here My code: Login.html:<html> <head> <title>A simple JSP application</title> <head> <body> <form method="get"

  • ITunes deleted apps from my touch

    Coincidental or not, before syncing my touch I upgraded the OS to 3.1.1. Previously my iTunes wasn't backing up my apps; my touch is a couple weeks old, and I hadn't set up iTunes to do so. Tonight I set up iTunes to back up the apps. When I synced,

  • LoadSound IE cache problem

    I see there are a lot of postings on this topic, however I haven't found any resolutions that are working for me. Here is the situation. I have a main movie, that loads external .swfs and plays in a linear way, much like a slide presentation. There a

  • IPhoto 4.0.3 crashes on import from disk or camera

    Whenever I try to import photos from my Canon camera or from a disk folder, the iPhoto program crashes. No files are imported. This means I can no longer add photos to my iPhoto library. Can anyone suggest how I can recover from this problem? I am ru

  • HELP!!! SHUFFLE & ADAPTER PROBLEM

    Hi!! I bought my little brother a shuffle and he went a bought an apple power adapter which stated could be used with all models, inc shuffle. however, the shuffle does not fit....the hole is a completely different shape....not very technical i know!