BDC Problem , Pls help

Hi ,
I am trying to create a BDC for routing opertaions update . During recording for a Screen ( that has subscreens )i get this :
BDC_SUBSCR SAPLCPDO       1210GENERAL.
I wanted to know Is there a special way to populate the subscreen fields ? I just copied the bdcdata-fnam = 'bdc_subscr' and fval = SAPLCPDO       1210GENERAL , but it looks like this is not the correct way as i get an error saying No transaction data for screen SAPLCPDO.
I would appreciate if anyone can let me know how to code for this.
Thank you very much

Tamanna,
If your requirement is how to code BDC program for a transaction which has subscreens in it...then refer to the example program I had created at one of my client places. But this is not for tcode CA02. Sorry I couldn't be of more help.
* Table declaration
TABLES:
  wyt3,
  /bay2/u7sxcrecce.
*& Internal Table Declaration for Bushy Park Legacy data
DATA : BEGIN OF i_leg OCCURS 0,
  po_nm(15),     " PO No - EBELN
  byrc(2),       " Purchasing group - buyer code - EKGRP
  vendor(10),    " LIFNR
  po_date(6),    " BEDAT
  cur(3),        " currency - WAERS
  zterm(2),      " terms code - ZTERM
  fob(2),        " FOB code - IINCO1
  mat(7),        " material - EMATN
  mat_pck(15),   " material PCK - ematn
  quant(15),     " quantity due - MENGE
  u_meas(2),     " Unit of measure - MEINS
  del_date(6),   " Item delivery date - EINDT
  ven_mat(30),   " Material # used by vendor
  net_pr(17),    " Net price - NETPR
  ship_via(3),   " Ship via
  del_loc(5),    " Delivery location -  ABLAD
  dist_acc(21),  " Distribution account
  txz01(55),     " Purchase Document Text
  recip(5),      " Recipient - WEMPF
  line_cd(3),    " Line code
  comp(2),       " Company
  line_num(4),   " PO line number
  indicator(1),  " Indictor as to what kind of PO's is being converted
  projnbr(30),   " filler
  works(2),      " Legacy works - WERKS
  work_ord(7),   " Work Order Number - AUFNR
  wbs(8),        " Project number - use for WBS x-ref
  cost_elem(7),  " G/L account for Project PO's w/o mat. master - SAKTO
  xref_wbs(23),  " WBS for manual load - SAKTO
  percent(12),   " Mara
* Filler for NET PRICE
  filler(17),    " Mara - net price
  gl_act(7),     " GL acct for Work Order
  label(3),      " Label
  iwg_warehouse(9),
  cost_cen(5),   " Cost center
  expence_cl(4), " Expence class
  tax_code(2),   " Tax Code
  quan_gr(16),   " Quantity of goods received
  amt_gr(17),    " Amount of goods received
  quan_fi(16),   " Quantity invoiced
  amt_fi(17),    " Amount invoiced
  site(15),      " Site name - Added by Naren Somen
*  flag(1),       " Indicator for valuted material - N/A
*  commit_amt(14)," Commitment value
END OF i_leg.
*& Internal Table Declaration for SAP data
DATA : BEGIN OF i_sap OCCURS 0,
          po_nm(15),            " PO No - EBELN
          ekgrp(3),             " Purchasing Group
          lifnr(10),            " Vendor Number
          zterm(4),             " Payment Terms
          werks(4),             " Plant
          txz01(40),            " Text
          netprice(14),         " Price
          commit_amt(14),       " Commitment values
       END OF i_sap.
DATA: bdcdata LIKE bdcdata          OCCURS 0 WITH HEADER LINE.
DATA: i_xleg LIKE i_leg OCCURS 0 WITH HEADER LINE.
DATA: i_wyt3 LIKE wyt3 OCCURS 0 WITH HEADER LINE.
DATA: p_itab LIKE i_leg OCCURS 0 WITH HEADER LINE.
* Internal table to store the messages
DATA: BEGIN OF i_mesage_tab OCCURS 0.
        INCLUDE STRUCTURE bdcmsgcoll .
DATA END OF i_mesage_tab.
*Begin of change by Naren Somen
*Buffer to the hold the records from tab delimited text file
DATA:  BEGIN OF i_record_buffer,
         record_buffer(4000)   TYPE c.
DATA:  END OF i_record_buffer.
*End of change by Naren Somen
DATA: w_input_rec_count(6) TYPE n," Input File Record Counter
      w_address TYPE p,           " Count of vendor addresses found
      w_flg  TYPE c VALUE 'X',    " BDC Rec Indicator
      w_insert_line(1) TYPE c,    " Insert New Line Item in PO
      w_del_date(10),             " Delivery Date Format Changes
      w_year(4),                  " Year
      w_mon(2),                   " Month
      w_date(2),                  " Date
      w_purgrp(3),                " SAP Purchasing group
      w_vendor(10),               " SAP vendor
      w_payterm(4),               " SAP payment terms
      w_plant(4),                 " SAP plant
      w_acct(10),                 " SAP G/L acct - temp
      w_order(12),                " SAP Work Order Number
      w_aufnr LIKE ekkn-aufnr.    " Work Order
DATA:  w_input LIKE swaexpdef-expr,
       w1_dec LIKE dfies-decimals,
       w_mul TYPE i,
       w_val TYPE i,
       w_val01 LIKE ekpo-netpr,
       w_netprice(11),                   " Net Price
       w_netprice_hold(11),              " hold variable for net price
       w_netprice1(14),                  " Net Price before dec. point
       w_netprice2(9),                   " Net Price after dec. point
       w_quant TYPE c VALUE '1',         " Quantity
       w_count LIKE sy-tabix,            " Loop Counter
       w_costcenter TYPE kostl,          " Costcenter
       w_glaccount TYPE kstar,           " G/L account
       w_item TYPE bstpo VALUE '0010',   " Line item number
       w_quote(1) TYPE x VALUE '27'.
DATA: BEGIN OF i_epstp,
         field1(11) TYPE c VALUE 'RM06E-EPSTP',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_epstp.
DATA: BEGIN OF i_knttp,
         field1(10) TYPE c VALUE 'EKPO-KNTTP',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_knttp.
DATA: BEGIN OF i_txz01,
         field1(10) TYPE c VALUE 'EKPO-TXZ01',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_txz01.
DATA: BEGIN OF i_eeind,
         field1(11) TYPE c VALUE 'RM06E-EEIND',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_eeind.
DATA: BEGIN OF i_netpr,
         field1(10) TYPE c VALUE 'EKPO-NETPR',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_netpr.
DATA: BEGIN OF i_matkl,
         field1(10) TYPE c VALUE 'EKPO-MATKL',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_matkl.
DATA: BEGIN OF i_werks,
         field1(10) TYPE c VALUE 'EKPO-WERKS',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_werks.
DATA: BEGIN OF i_ktext1,
         field1(11) TYPE c VALUE 'ESLL-KTEXT1',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_ktext1.
DATA: BEGIN OF i_meins,
         field1(10) TYPE c VALUE 'ESLL-MEINS',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
      END OF i_meins.
DATA: BEGIN OF i_ekpo_meins,
         field1(10) TYPE c VALUE 'EKPO-MEINS',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_ekpo_meins.
DATA: BEGIN OF i_menge,
         field1(10) TYPE c VALUE 'ESLL-MENGE',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_menge.
DATA: BEGIN OF i_ekpo_menge,
         field1(10) TYPE c VALUE 'EKPO-MENGE',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_ekpo_menge.
DATA: BEGIN OF i_tbtwr,
         field1(10) TYPE c VALUE 'ESLL-TBTWR',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_tbtwr.
DATA: BEGIN OF i_mkntm,
         field1(11) TYPE c VALUE 'RM11K-MKNTM',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_mkntm.
DATA: BEGIN OF i_kostl,
         field1(10) TYPE c VALUE 'ESKN-KOSTL',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_kostl.
DATA: BEGIN OF i_sakto,
         field1(10) TYPE c VALUE 'ESKN-SAKTO',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_sakto.
DATA: BEGIN OF i_bstpo,
         field1(11) TYPE c VALUE 'RM06E-BSTPO',
         field2(1) TYPE c VALUE '(',
         field3(3) TYPE n VALUE 000,
         field4(1) TYPE c VALUE ')',
     END OF i_bstpo.
DATA: BEGIN OF i_kstar,
         kstar TYPE kstar,
      END OF i_kstar.
DATA: c_yb(2) VALUE 'YB'.
DATA: c_partner_counter(3) TYPE c VALUE '002'. "Partner Counter -
"Naren Somen
CONSTANTS: c_185(4) TYPE c VALUE '0185',     " System ID - Walker
           c_202(4) TYPE c VALUE '0202',     " System ID - Bushy Park
           c_delimiter(1) TYPE x  VALUE '09'," tab character-Naren Somen
           c_unit(2) TYPE c VALUE 'PU',      " Unit of measure
           c_sq(2) TYPE c VALUE 'SQ',
           c_zero(1) TYPE c VALUE '0',
           c_loop(2) TYPE c VALUE '14',
           c_00(2) TYPE c VALUE '00'.
*& Input Parameters / Selection Options
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-tx1.
PARAMETERS : p_input  LIKE filename-fileextern OBLIGATORY,  " Input File
             p_error  LIKE filename-fileextern OBLIGATORY. " Output File
SELECTION-SCREEN END OF BLOCK bl1.
SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-tx3.
PARAMETERS : p_ekorg LIKE ekko-ekorg OBLIGATORY.
SELECTION-SCREEN END OF BLOCK bl3.
SELECTION-SCREEN BEGIN OF BLOCK bl4 WITH FRAME TITLE text-tx4.
PARAMETERS : p_uname LIKE apqi-userid OBLIGATORY,
             p_sess LIKE bgr00-group OBLIGATORY.
SELECTION-SCREEN END OF BLOCK bl4.
*& Main Program Logic
START-OF-SELECTION.
  PERFORM open_input_output_files.
  PERFORM create_bdc_session.
  PERFORM write_results.
END-OF-SELECTION.
*&      Form  OPEN_INPUT_OUTPUT_FILES
FORM open_input_output_files.
  PERFORM open_input_file.
  PERFORM open_output_error_file.
ENDFORM.                    " OPEN_INPUT_OUTPUT_FILES
*&      Form  CREATE_BDC_SESSION
FORM create_bdc_session.
  PERFORM open_group.
  i_xleg[] = i_leg[].
  LOOP AT i_leg.
    IF i_leg-po_nm = i_xleg-po_nm.
      SKIP.
    ELSE.
      PERFORM read_xref_tables.
*-- First screen
      CLEAR w_insert_line.
      PERFORM bdc_dynpro      USING 'SAPMM06E'    '0100'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'RM06E-BSART'.
      PERFORM bdc_field       USING 'BDC_OKCODE'  '/00'.
      PERFORM bdc_field       USING 'EKKO-LIFNR'  i_sap-lifnr.
      PERFORM bdc_field       USING 'RM06E-BSART' c_yb.
      PERFORM bdc_field       USING 'EKKO-EKORG'  p_ekorg.
      PERFORM bdc_field       USING 'EKKO-EKGRP'  i_sap-ekgrp.
      PERFORM vendor_address.
      IF w_address EQ '3'.
        PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
        PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
        PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
      ENDIF.
      IF w_address EQ '2'.
        PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
        PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
      ENDIF.
      IF w_address EQ '1'.
        PERFORM bdc_dynpro      USING 'SAPMSSY0'    '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  '04/02'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=SELV'.
      ENDIF.
      PERFORM bdc_dynpro      USING 'SAPMM06E'    '0120'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'RM06E-EBELP'.
      PERFORM bdc_field       USING 'BDC_OKCODE'  '=KOPF'.
      PERFORM bdc_dynpro      USING 'SAPMM06E'    '0101'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'EKKO-VERKF'.
      PERFORM bdc_field       USING 'BDC_OKCODE'  'AB'.
      PERFORM bdc_field       USING 'EKKO-VERKF'  i_leg-po_nm.
      PERFORM bdc_field       USING 'EKKO-ZTERM'  i_sap-zterm.
      PERFORM bdc_field       USING 'EKKO-SPRAS'  'EN'.
      PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLXM06'.
      PERFORM record_counter.
      LOOP AT i_xleg WHERE po_nm EQ i_leg-po_nm.
*        w_count = w_count + 1.
        WRITE: i_leg-del_date TO w_del_date YYMMDD.
        CONCATENATE '20' w_del_date INTO w_del_date.
        MOVE w_del_date(4) TO w_year.
        MOVE w_del_date+4(2) TO w_date.
        MOVE w_del_date+6(2) TO w_mon.
        CONCATENATE w_date '/' w_mon '/' w_year INTO w_del_date.
        PERFORM item_xref_tables.
        IF w_insert_line EQ space.
*-- Second Screen Line # 1
          PERFORM bdc_dynpro  USING 'SAPMM06E' '0120'.
          PERFORM bdc_field   USING 'BDC_CURSOR'  i_eeind.
          PERFORM bdc_field   USING 'BDC_OKCODE'  '/00'.
*          PERFORM bdc_field   USING i_bstpo  w_item.
          PERFORM bdc_field   USING i_epstp  'D'.
          PERFORM bdc_field   USING i_knttp  'K'.
          PERFORM bdc_field   USING i_txz01  i_sap-txz01.
          PERFORM bdc_field   USING i_eeind  w_del_date.
          PERFORM bdc_field   USING i_netpr  i_sap-netprice.
          PERFORM bdc_field   USING i_matkl  '25080400'.
          PERFORM bdc_field   USING i_werks  i_sap-werks.
**-- Second Screen Line # 2 Onwards.
        ELSE.
*--- Call Insert Line.
          PERFORM line_item_data.
          IF i_epstp-field3 GT c_loop.
            PERFORM bdc_dynpro   USING 'SAPMM06E' '0120'.
            PERFORM bdc_field    USING 'BDC_CURSOR'  'RM06E-EBELP'.
            PERFORM bdc_field    USING 'BDC_OKCODE'  '=NP'.
            PERFORM record_counter.
            PERFORM line_item_data.
          ENDIF.
          PERFORM bdc_dynpro   USING 'SAPMM06E' '0120'.
          PERFORM bdc_field    USING 'BDC_CURSOR'  i_eeind.
          PERFORM bdc_field    USING 'BDC_OKCODE'  '/00'.
*          PERFORM bdc_field    USING i_bstpo  w_item.
          PERFORM bdc_field    USING i_epstp  'D'.
          PERFORM bdc_field    USING i_knttp  'K'.
          PERFORM bdc_field    USING i_txz01  i_sap-txz01.
          PERFORM bdc_field    USING i_eeind  w_del_date.
          PERFORM bdc_field    USING i_netpr  i_sap-netprice.
          PERFORM bdc_field    USING i_matkl  '25080400'.
          PERFORM bdc_field    USING i_werks  i_sap-werks.
        ENDIF.
        w_insert_line = 'X'.
*-- Third Screen.
        PERFORM bdc_dynpro      USING 'SAPLMLSP'    '0200'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '/00'.
        PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSP'.
        PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSL'.
        PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSL'.
        PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSP'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  'ESLL-TBTWR(01)'.
        PERFORM bdc_field       USING i_ktext1 i_sap-txz01.
        PERFORM bdc_field       USING i_menge  i_xleg-quant.
        PERFORM bdc_field       USING i_meins  'PU'.
        PERFORM bdc_field       USING i_tbtwr  i_sap-netprice.
        PERFORM bdc_dynpro      USING 'SAPLMLSK'    '0200'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  'ESKN-SAKTO(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '/00'.
        PERFORM bdc_field       USING i_mkntm  w_quant.
        PERFORM bdc_field       USING i_kostl  w_costcenter.
        PERFORM bdc_field       USING i_sakto  w_glaccount.
        PERFORM bdc_dynpro      USING 'SAPLMLSK'    '0200'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  'ESLL-INTROW'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=BACK'.
        PERFORM bdc_dynpro      USING 'SAPLMLSP'    '0200'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=ESB'.
        PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSP'.
        PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSL'.
        PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSL'.
        PERFORM bdc_field       USING 'BDC_SUBSCR'  'SAPLMLSP'.
        PERFORM bdc_field       USING 'BDC_CURSOR'  'ESLL-KTEXT1(01)'.
        ENDLOOP.
        PERFORM bdc_dynpro      USING 'SAPMM06E' '0120'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=BU'.
        PERFORM bdc_transaction USING 'ME21'.
    ENDIF.
  ENDLOOP.
  PERFORM close_group.
ENDFORM.                    " CREATE_BDC_SESSION
*&      Form  WRITE_RESULTS
FORM write_results.
  WRITE: text-tx5, w_input_rec_count.
ENDFORM.                    " WRITE_RESULTS
*&      Form  OPEN_INPUT_FILE
FORM open_input_file.
  OPEN DATASET p_input FOR INPUT IN TEXT MODE.
  IF sy-subrc <> 0.
    MESSAGE e000 WITH p_input.
  ENDIF.
  DO.
    READ DATASET p_input INTO i_record_buffer.
    IF sy-subrc <> 0.
      EXIT.
    ELSE.
      SPLIT i_record_buffer-record_buffer AT  c_delimiter INTO
                                                i_leg-po_nm
                                                i_leg-byrc
                                                i_leg-vendor
                                                i_leg-po_date
                                                i_leg-cur
                                                i_leg-zterm
                                                i_leg-fob
                                                i_leg-mat
                                                i_leg-mat_pck
                                                i_leg-quant
                                                i_leg-u_meas
                                                i_leg-del_date
                                                i_leg-ven_mat
                                                i_leg-net_pr
                                                i_leg-ship_via
                                                i_leg-del_loc
                                                i_leg-dist_acc
                                                i_leg-txz01
                                                i_leg-recip
                                                i_leg-line_cd
                                                i_leg-comp
                                                i_leg-line_num
                                                i_leg-indicator
                                                i_leg-projnbr
                                                i_leg-works
                                                i_leg-work_ord
                                                i_leg-wbs
                                                i_leg-cost_elem
                                                i_leg-xref_wbs
                                                i_leg-percent
                                                i_leg-filler
                                                i_leg-gl_act
                                                i_leg-label
                                                i_leg-iwg_warehouse
                                                i_leg-cost_cen
                                                i_leg-expence_cl
                                                i_leg-tax_code
                                                i_leg-quan_gr
                                                i_leg-amt_gr
                                                i_leg-quan_fi
                                                i_leg-amt_fi
"Added by Naren Somen
                                                i_leg-site.
*                                                i_leg-flag
*                                                i_leg-commit_amt.
      APPEND i_leg.
    ENDIF.
  ENDDO.
  DESCRIBE TABLE i_leg LINES w_input_rec_count.
  CLOSE DATASET p_input.
ENDFORM.                    " OPEN_INPUT_FILE
*&      Form  OPEN_OUTPUT_ERROR_FILE
FORM open_output_error_file.
  OPEN DATASET p_error FOR OUTPUT IN TEXT MODE.
  IF sy-subrc <> 0.
    MESSAGE e001 WITH p_error.
  ENDIF.
ENDFORM.                    " OPEN_OUTPUT_ERROR_FILE
*&      Form  OPEN_GROUP
FORM open_group.
  CALL FUNCTION 'BDC_OPEN_GROUP'
       EXPORTING
            client = sy-mandt
            group  = p_sess
            user   = p_uname
            keep   = 'X'.
ENDFORM.                    " OPEN_GROUP
*&      Form  BDC_DYNPRO
FORM bdc_dynpro USING  program  dynpro.
  CLEAR bdcdata.
  bdcdata-program  = program.
  bdcdata-dynpro   = dynpro.
  bdcdata-dynbegin = w_flg.
  APPEND bdcdata.
  CLEAR bdcdata.
ENDFORM.                               " BDC_DYNPRO
*&      Form  BDC_FIELD
FORM bdc_field USING fnam fval.
  CLEAR bdcdata.
  bdcdata-fnam = fnam.
  bdcdata-fval = fval.
  APPEND bdcdata.
  CLEAR bdcdata.
ENDFORM.                               " BDC_FIELD
*&      Form  BDC_transaction
FORM bdc_transaction USING tran_code.
  CALL FUNCTION 'BDC_INSERT'
       EXPORTING
            tcode     = tran_code
       TABLES
            dynprotab = bdcdata.
  CLEAR bdcdata.
  REFRESH bdcdata.
ENDFORM.                               " BDC_TRANSACTION
*&      Form  CLOSE_GROUP
FORM close_group.
  CALL FUNCTION 'BDC_CLOSE_GROUP'
       EXCEPTIONS
            not_open    = 0
            queue_error = 0
            OTHERS      = 0.
ENDFORM.                               " CLOSE_GROUP
*&      Form  READ_XREF_TABLES
*       text
*  -->  p1        text
*  <--  p2        text
FORM read_xref_tables.
  CLEAR i_sap.
  PERFORM convert_pur_group            USING i_leg-byrc.
  PERFORM convert_vendor               USING i_leg-vendor.
  PERFORM convert_payterm              USING i_leg-zterm.
ENDFORM.                    " READ_XREF_TABLES
*&      Form  CONVERT_PUR_GROUP
FORM convert_pur_group USING    p_byrc.
  SELECT SINGLE ekgrp FROM /bay2/u7emxrbuyr
     INTO w_purgrp
     WHERE system_id EQ c_185 AND leginp_cd EQ p_byrc.
  IF sy-subrc EQ 0.
    MOVE w_purgrp TO i_sap-ekgrp.
    CLEAR w_purgrp.
  ENDIF.
ENDFORM.                    " CONVERT_PUR_GROUP
*&      Form  CONVERT_VENDOR
FORM convert_vendor USING    p_vendor.
  DATA : w_venfamily(8) TYPE c,
         w_vendor_temp(7) TYPE c,
         wa_vendor TYPE /bay2/u7pxxrvend,
         wa_vendor1 TYPE /bay2/u7pxxrvend.
  CLEAR: w_vendor, w_venfamily, w_vendor_temp.
* Select with Full Vendor Number
  SELECT SINGLE * FROM /bay2/u7pxxrvend INTO wa_vendor
      WHERE leg_ven_num EQ p_vendor AND system_id = c_185.
  IF sy-subrc EQ 0.
    IF wa_vendor-ktokk EQ 'YKRD'.
      MOVE wa_vendor-lifnr TO w_vendor.
    ELSE.     " IF YSUP
* Select the YKRD for corrusponding YSUP from WYT3
      SELECT ekorg lifnr
      INTO (wyt3-ekorg, wyt3-lifnr)
      FROM wyt3
      WHERE
      lifn2 EQ wa_vendor-lifnr.
        SELECT SINGLE lifnr
        INTO w_vendor
        FROM wyt3
        WHERE lifnr EQ wyt3-lifnr AND
              ekorg EQ wyt3-ekorg AND
              parvw EQ 'LF'.
        IF sy-subrc EQ 0.
          EXIT.
        ENDIF.
      ENDSELECT.                " SELECT ekorg lifnr
    ENDIF.                      " IF wa_vendor-ktokk EQ 'YKRD'.
  ENDIF.                        " IF SY-SUBRC EQ 0.
  IF w_vendor IS  INITIAL.
* Select YKRD with Legacy Vendor Family Number
    MOVE p_vendor TO w_vendor_temp.
    CONCATENATE w_vendor_temp '%' INTO w_venfamily.
    SELECT SINGLE * FROM /bay2/u7pxxrvend INTO wa_vendor1
            WHERE leg_ven_num LIKE w_venfamily AND
            ktokk EQ 'YKRD' AND system_id = c_185.
    IF sy-subrc EQ 0.
      MOVE wa_vendor1-lifnr TO w_vendor.
      MOVE w_vendor TO i_sap-lifnr.
    ELSE.
      CONCATENATE p_vendor 'X' INTO i_sap-lifnr.
    ENDIF.
  ELSE.
    MOVE w_vendor TO i_sap-lifnr.
  ENDIF.
ENDFORM.                    " CONVERT_VENDOR
*&      Form  CONVERT_PAYTERM
FORM convert_payterm USING    p_i_leg01_trms_code.
  SELECT SINGLE zterm
  INTO w_payterm
  FROM /bay2/u7emcpterm
  WHERE legpterm EQ p_i_leg01_trms_code AND system_id = c_185.
  IF sy-subrc = 0.
    MOVE w_payterm TO i_sap-zterm.
    CLEAR w_payterm.
  ENDIF.
ENDFORM.                    " CONVERT_PAYTERM
*&      Form  CONVERT_PLANT
FORM convert_plant USING p_works.
  SELECT SINGLE werks FROM /bay2/u7smcpwerk
     INTO w_plant
     WHERE system_id EQ c_185
     AND legwerks EQ p_works.
  IF sy-subrc = 0.
    MOVE w_plant TO i_sap-werks.
  ENDIF.
ENDFORM.                    " CONVERT_PLANT
*&      Form  VENDOR_ADDRESS
*       text
*  -->  p1        text
*  <--  p2        text
FORM vendor_address.
  REFRESH i_wyt3.
  SELECT * FROM wyt3 INTO i_wyt3
  WHERE lifnr EQ i_sap-lifnr
  AND parza = c_partner_counter.
    APPEND i_wyt3.
    CLEAR i_wyt3.
  ENDSELECT.
  DESCRIBE TABLE i_wyt3 LINES w_address.
ENDFORM.                    " VENDOR_ADDRESS
*&      Form  ITEM_XREF_TABLES
FORM item_xref_tables.
  PERFORM convert_plant                USING i_xleg-works.
  PERFORM convert_costcenter           USING i_xleg-cost_cen
i_xleg-works.
  PERFORM convert_glacc                USING i_xleg-expence_cl.
  MOVE: i_xleg-txz01(40) TO i_sap-txz01,
        i_xleg-po_nm TO i_sap-po_nm,
        i_xleg-filler+3(14) TO i_sap-netprice.
*        i_xleg-commit_amt TO i_sap-commit_amt.
ENDFORM.                    " ITEM_XREF_TABLES
*&      Form  RECORD_COUNTER
FORM record_counter.
  i_epstp-field3 = 1.
  i_knttp-field3 = 1.
  i_txz01-field3 = 1.
  i_eeind-field3 = 1.
  i_netpr-field3 = 1.
  i_matkl-field3 = 1.
  i_werks-field3 = 1.
  i_ktext1-field3 = 1.
  i_meins-field3 = 1.
  i_menge-field3 = 1.
  i_tbtwr-field3 = 1.
  i_mkntm-field3 = 1.
  i_kostl-field3 = 1.
  i_sakto-field3 = 1.
  i_ekpo_meins-field3 = 1.
  i_ekpo_menge-field3 = 1.
  w_count = 0.
ENDFORM.
*&      Form  LINE_ITEM_DATA
FORM line_item_data.
   i_epstp-field3 = i_epstp-field3 + 1.
   i_knttp-field3 = i_knttp-field3 + 1.
   i_txz01-field3 = i_txz01-field3 + 1.
   i_eeind-field3 = i_eeind-field3 + 1.
   i_netpr-field3 = i_netpr-field3 + 1.
   i_matkl-field3 = i_matkl-field3 + 1.
   i_werks-field3 = i_werks-field3 + 1.
   i_ekpo_menge-field3 = i_ekpo_menge-field3 + 1.
   i_ekpo_meins-field3 = i_ekpo_meins-field3 + 1.
   w_item = w_item + 10.
ENDFORM.
*&      Form  CONVERT_COSTCENTER
FORM convert_costcenter           USING p_costcenter p_works.
   CONCATENATE c_sq p_works p_costcenter c_zero INTO w_costcenter.
ENDFORM.
*&      Form  CONVERT_COSTCENTER
FORM convert_glacc                USING w_expence_cl.
   SELECT SINGLE kstar FROM /bay2/u7sxcrecce INTO i_kstar-kstar WHERE
leginp_cd EQ w_expence_cl.
   MOVE i_kstar-kstar TO w_glaccount.
ENDFORM.
Thanks,

Similar Messages

  • Urgent: Sessions problem pls help me

    Hi all,
    Its already late to post this problem.pls help me urgently.
    I have a servlet & two jsp's. first i request servlet, it processes something and forwards request to my first jsp. In that jsp on a button click, i'm displaying a new popup by calling showModalDialog. this dialog gets data from the same servlet but it forwards to my second jsp.(second jsp can be seen in dialog)
    Now if i submit form from my second(dialog) jsp, the servlet reports that session has expired. I tried a lot but invain. any one who helps me is appreciated well by all of our forum.
    waiting 4 u r reply,

    It could be that you have cookies turned off and you're not using URL Rewriting.
    In J2EE, the first time your browser makes a request to the server, the server responds and appends a SESSION_ID parameter to the request as well as storing a cookie with the SESSION_ID.
    The second time your browser makes a request, the server checks for the cookie. If it doesn't exist it checks for the parameter. If neither exist the server assumes its the first time your browser has made a request and behaves as describe in the previous paragraph.
    In your case when you submit the form if you have disabled cookies and the action attribute doesn't have the SESSION_ID paramter appended to the url, the browser will assume it's a first request. The user will not be logged in, hence your session has expired error.
    To fix this you need to encode the URL in your JSP. You can use the struts html:rewrite tag or the HttpServletReponse.encodeURL method, or if you're using JSP 2.0 the JSTL c:url tag.

  • Boot problem == pls HELP

    I have use the utility disk and format the machintos drive , and use  Extended (Journaled , Encrypted) , it ask me for a password (typed the password, confirmed the password - done) ,  after that i tried to install a fresh copy of Lion (i waited to be downloded from apple.com - done) after that it said that the fresh copy it will be installed and it will reboot by itself -> done ... from here the problem it's starting .... now my macbook air , it dosent start anymore it keep showming me, instaid of the apple sign from the start , a sign like the one from ghost busters (but without the ghost in it ) , i have tried to boot from cd , from usb , nothing dosent seams to be working.
    If anyone know a solution to this problem, pls HELP! Thank you in advance...
    p.s. before i had 2 hard drives that show up when i press the ALT button (machintos hd and utility drive, or something like that) now.. the only thing that it's showing me is : mac os base system , and if i try to use partition magic or something else, from a usb, it will tell me something about a bootguard , but i don't know how to insert the password.

    Glad your issue is fixed. Thanks for the update!
    Click if you want to Thank someone. If Problem is resolved, so that others can make use of it.

  • How to solve this problem, pls help when I try to see remote camera system from home."Dual streaming is required for HTML viewing"

    How to solve this problem, pls help when, I try to see remote camera system(spec dvr) from home. The Error I get is "Dual streaming is required for HTML viewing"

    I had the same probelm and found that the problem lies with 64bit programs such as safari and microsoft internet explorer. I have resolved the issue on my PC based server by using a 32 bit ie and same on my mac by using the same running windows under parallels.
    So far the problem with the 64 bit side of it is still to be resolved.
    Hope this helps and gets you guys up and running until suchtime a 64 bit solution is found.
    Craig

  • Import problem,pls help!

    Hi,there,
    I'm new guy here,I'v got a problem about Import in table mode,I found I can import back all records successfully, but it just appends all records into the orignal table,not overwrite
    it,for example, I made a export for a table with 2 records, after then I added some records into that table,
    finally I made an import for that table, I found the
    total of records is not recovered to 2,but just append
    the records from export file,why can't I recover it to 2
    record? pls help me,thanks!

    All that import does is to run a bunch of SQL statements based on the content of the export file. If you look at the export file in an editor (if its small), or through type (on Windoze) or more on *NIX you will see stuff like:
    CREATE TABLE x STORAGE ( ...)
    INSERT INTO x col12,col2, ...
    VALUES (:b1,:b2, ...
    If you give imp the paramter ignore=Y, then the error generated by the CREATE TABLE (table already exists) will be suppressed, but the ata will be inserted. Note that there are no DROP TABLE or TRUNCATE TABLE commands in the export file.
    If you want to restore your database to a particular point in time using import, then you will need to manually drop or truncate the tables first. You can generate the required sql from the data dictionary. something like
    SET lines 1000 pages 0 feedback off trimspool on;
    SPOOL drop.sql;
    SELECT 'DROP TABLE '||table_name||';'
    FROM user_tables;
    SPOOL OFF;
    @drop.sqlHTH
    John

  • Weird Problem pls help.

    Hi guys I have a big problem that I can't figure out. See I have a PT880 Neo and on the mobo box it says it's VIA. But when I go to install the Hyperion 4 in 1 mobo drivers my system crashes. When I boot up I get a Bsod stating my graphics card is in an infinite loop and says the video driver for my card is the problem. Also when I go to install new hardware it doesn't detect it. I checked the bios and pnp is enabled. So I put a new network card in and it will only detect it in the top pci slot so is this some kind of glitch am I downloaded the right drivers? The hyperion 4 in 1's version 455vp1 pls help

    I need your full system specs + PSU specs.
    Read these guides as well >Moan Guide Power Supply Guide

  • Upgradation problem pls help

    I imported my oracle 8.1.5 database dump in oracle 8.1.7 but when I want to connect to my instance thru a client machine one error message comes as "
    problem in connecting to the database, check whether it is started or contact sys admin" whereas the database is in open state.
    Then when I connected to sqlplus at the server, it gets connected but some messages also come as below"
    ORA-06553: PLS-213: package STANDARD not accessible
    Error accessing package DBMS_APPLICATION_INFO
    ERROR:
    ORA-06553: PLS-213: package STANDARD not accessible
    Could anyone pls help..

    What is the result of
    SQL> show parameter PLSQL_V2_COMPATIBILITY
    ?

  • Serious problem. pls help !!!!!!!!!

    some "khar, khar sound is coming from below of the keyboard of my hp g6 pavillion 2231 all the time when the lapton is on. what to do. i am fed off of that noise. pls help!!!!!!!!
    This question was solved.
    View Solution.

    Hi 
         Sorry khar khar ????   Mainly any sounds from under the keyboard would be Fan or HDD either way could mean either the Fan ( if fan ) is struggling to move due to dust build up OR the hard drive is failing  ,,, It's difficult to give you a firm answer without more information . Can you tell the difference between the fan noise and a hard drive noise ?? When you start up from cold does the noise start immedietly or is it only heard after say 5-10 minutes ??????           Checkurtech
    ****Click the White Kudos star to say thanks****
    ****Please mark Accept As Solution if it solves your problem****

  • Installation problem, pls help

    I am trying to install Oracle 10g on SUSE 10.0.0 but when i run the ./runInstaller command, I receive an[b] error of writting to directory /tmp/OraInstall2006-03........, Please ensure this directory is writable and at least 60MB of disk space, i have checked for space using df -h /tmp, there is enough space, i think the problem has got to do with permission because @ the moment it belongs to root user, i don't know what to do, i am a novice to unix and need to install oracle today. Pls help
    Usually the standard install of SuSE Linux should set the ownership and access rights to /tmp, if you want to give access to everyone on the system, just use this command (if owner/root access is available):
    I have used chmod o+rwx /tmp command and still having the same error. Pls somebody help
    chmod o+rwx /tmp

    Of course I assume you did correctly follow installation and configuration instructions. Did you read Oracle10g/Linux Errors and Problems from Werner Puschitz ?

  • Audio+Video Chat works but one small problem.Pls help.

    HI..
    as i had posted once before in a different query's thread, i have implemented audio and video chat using AVTRansmit2 and avreceive2.
    audio and video chat work well.By video chat i mean not only video but VIDEO+AUDIO as well.. just like usual yahoo video chat.
    But the problem is like this:-=
    I have given an option for user to switch from audio chat to video chat.
    now if a user first goes to audio chat and then switched to video chat,
    then the problem comes. When he's shifted to video chat i close down previous Audio chat by RTPManager.dispose() , i close the player and everything..
    and then i start Video transmit/receive "ALONG WITH" audio transmit/receive..
    No this time video starts but audio doesnt work ..
    it says"waiting for rtp data to arrive.... "
    The problem is that when this new stream of audio data comes, the receiver somehow thinks that its the same old stream since its from same transmitter IP.. and so it tries to UPDATE the previous stream.
    It means there is some problem with the close method or RTPManager.dispose() which should have disposed off all the stuff much before the new connection was made.
    PLS HELP ASAP>
    this is crunch time for my project.

    Hi anandreyvk . .
    well, i had tried doing removetargets and also, i had disposed RTPManager well. As it turns out the problem was not with any of it but it was the problem of me incorrectly passing RTPManager from AVReceive2 to AVTransmit2.
    Actually i am using just one RTPManager.. since i am receiving and transmitting on the same port.
    i've solved the problem but i am not sure if this is the right way .. what do you think ??
    is creating just one RTPManager {by that,i mean initializing it only once} a good idea ?? Since we are supposed to call both AVTransmit2 and AVReceive2 with the "LOCAL PORT" .. {which in itself is a matter of discussion though! } i and my project mate thought initializing RTPManager only once is a better option .
    Whats your take on all of this ?

  • Help me out  to resolve a conditional problem----pls help

    Hi Experts ,
    I have the requirement in which if the apinumber is greater than or equal to 10 then only the rows should get inserted into the well_header_table from products_mv table.I need to use only merge concept and nothing else.
    I am making use of the merge concept here .I am checking for the 10 digit condition during the updation part but same will be inserted into the well header table.This shouldnt happen .Can any one suggest me how can i filter out the insertion part so that it only inserts the rows which has api_number greater than 10 digits.I have marked my 10 digit condition that checks for the update part in bold form.
    Pls help me out in resolving this issue .
    regards
    debashis
    [\n]
    CREATE or REPLACE PROCEDURE NAG.MERGE AS
    BEGIN
    merge into NAG.Well_Header_Table
    using nag.products_mv
    on (SUBSTR(nag.products_mv.API_NUM,0,10) = SUBSTR(NAG.Well_Header_Table.API_NUMBER,0,10) )
    WHEN MATCHED THEN UPDATE SET
    NAG.Well_Header_Table.WELL_NAME = nags.products_mv.WELL_NAME where nag.products_mv.API_NUM >= 999999999
    WHEN NOT MATCHED THEN INSERT (NAG.Well_Header_Table.API_NUMBER,NAG.Well_Header_Table.WELL_NAME,NAG.Well_Header_Table.SECTION,NAG.Well_Header_Table.TOWNSHIP,NAG.Well_Header_Table.RANGE,NAG.Well_Header_Table.WELL_METER_NUMBER,NAG.Well_Header_Table.COUNTY_NAME,NAG.Well_Header_Table.OPERATOR_NAME,NAG.Well_Header_Table.PRODUCTION_FORMATION,NAG.Well_Header_Table.STATE_NAME,NAG.Well_Header_Table.FIELD_NAME,NAG.Well_Header_Table.WELL_FLAC_NUMBER,NAG.Well_Header_Table.WELL_LEASE_FLAC,NAG.Well_Header_Table.WELL_TYPE,NAG.Well_Header_Table.WELLBORE_PROFILE,NAG.Well_Header_Table.STATUS)
    values (nag.products_mv.API_NUM,upper(nag.products_mv.WELL_NAME),nag.products_mv.SECTION,nag.products_mv.TOWNSHIP,nag.products_mv.RANGE,nag.products_mv.METER_NUMBER,upper(nag.products_mv.COUNTY_NAME),upper(nag.products_mv.OPERATOR),upper(nag.products_mv.PROD_ZONE),upper(nag.products_mv.STATE_NAME),upper(nag.products_mv.FIELD),nag.products_mv.WELL_FLAC_HZ,nag.products_mv.LEASE_FLAC,upper(nag.products_mv.WELL_TYPE),upper(nag.products_mv.WELLBORE_PROFILE),null);
    END;
    [n]
    regards
    Debashis

    Try those selects below and look at your on condition
    select substr('123456789',1,10) from dual
    select 123456789 from dual where 123456789 > 999999999
    -- perhaps
    on (nag.products_mv.API_NUM = NAG.Well_Header_Table.API_NUMBER and nag.products_mv.API_NUM > 999999999)Regards
    Etbin

  • Im my lap has hard disk problem,how to resolve the problem,pls help me...

    Hello,
               I have hp pavilion dv4 lap,in this lap has some hard disk problem,when i am turn on the lap that screen shows this message "The smart hard disk check has detected an imminent failure.To ensure not data loss,please backup the content immediately and run the hard disk test in system diagnostics".
               After that i was diagnostics the system but no changes in the lap,,again again lap shows hard disk error(301).
               Then i  am chosen the enter option to start up the lap it take long time for openning the windows,after enter the windows that also shows about the hard disk  error in within few minitues,
               What can i do?
               This lap bought at 12-oct-2012 from malasiya,now im in tamil nadu,how to solve the problem please help me.

    Hello srhk. Thank you for posting on the HP Forums.
    I understand the hard disk is experiencing issues. Error 301 indicates the hard disk possesses a hardware defect. I would contact HP Phone Support for assistance, or purchase an equivalent hard disk.
    If you choose to contact HP, their options will be based on the warranty status of the computer. If you do not have this information, you can locate it at this website: http://h20566.www2.hp.com/portal/site/hpsc/public/wc/home?ac.admitted=1384280905804.876444892.199480...
    You can utilize this website to learn how to contact HP appropriately, based on your region: http://www8.hp.com/us/en/contact-hp/ww-contact-us.html
    Please let me know if you have any other questions or concerns.
    Mario
    I worked on behalf of HP.

  • SQL server weird connection problem-Pls help

    I m using SQL server 2005 express. My default logon mode setting is set to-SQL server authentication and I can logon to using SQL server management studio express always. I enabled TCP/IP from SQL server configuration manager. The sqljdbc.jar (JDBC driver) is set correctly in classpath and 1433 port is allowed in windows firewall. YET, I can�t connect to sql server using the following code-
    import java.sql.*; public class testconn { Statement stmt; Connection con = null;       String driver = "jdbc:sqlserver://"; String server = "localhost:1433;"; String db = "database=IDLC-Customer;"; String user = "userName=Tanvir;"; String pwd = "password=abcd;"; String connectName = driver + server + db + user + pwd;    testconn() { try {       Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");       con= DriverManager.getConnection(connectName);       stmt=con.createStatement();       if(!con.isClosed())         System.out.println("Successfully connected to " +           "SQL server using TCP/IP...");     } catch(Exception e) {       System.err.println("Exception: " + e);    }     finally {    try {         if(con != null)           con.close();         } catch(SQLException e) {}    }        }   public static void main(String args[]) {       testconn tc=new testconn();   } }
    My host name is- Tanvir. So, in management studio express the server name is shown- TANVIR\SQLEXPRESS
    When I run the code it says-The TCP/IP connection to the host has failed.
    Java.net.connectException:Connection Refused: Connect
    One more thing, though 1433 port is allowed in windows firewall, I can�t connect to that port using telnet (e.g. telnet <server_host> 1433).I even disabled firewall and tried but in vain. PLEASE help me brother.

    masijade. wrote:
    Then you, seemingly, have not configured your SQL server properly, or you have not "activated" that configuration.
    (don't ask because I don't know how, or even if, you do it that way with SQL Server).
    But, not being able to connect with telnet, means that nothing is listening on that port. What does the netstat command tell you?Brother,as u know that sql server use the default port 1433 even if i don't mention it.And I tried disabling my firewall and antivirus but yet I cant connect.I searched the ports using "Advanced port scanner" but the port 1433 is neither in its open ports list nor in closed port list. WHat can I do now.The port 1433 is by default used by sql server.So even if I dont mention it or set it, it should work.Isn't it? I m getting out of my mind, pls help .

  • Email problems pls help

    cut a long story short bought a brand new curve 8900 on ebay i am with t- mobile unlimited internet
    but how do i set up hotmail to work on my new phone pls help am new to this phone

    you need to call T-Mobile and ask for a BlackBerry Data Plan. Otherwise you can only do phone calls & sms.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • FindClass() Problem Pls Help.. (URGENT!!)

    Hi,
    I trying to use the files from the book "JNI Programmer's Guide & Specifications" - Ch. 7., to create JVM & call a java method from c routine.
    I m working on Solaris machine. JVM is 1.1, so the correct part of the version independent code runs (refer to invoke.c below)
    LD_LIBRARY_PATH is set correctly. invoke.c is complied correctly with no errors. All the files namely Prog.java, Prog.class, invoke.c, a.out are in the same directoy "/home/top/atm".
    When executable file is run. JVM is created. But FindClass() returns with NULL value. !!!
    When I try to run Prog.java from the commandline using "java Prog Hello" it runs good.
    It just simply won't find the Prog.class in it's current directory. ???
    If instead, "java/util/Date" is passed to FindClass(), it finds it.
    The classpath in the program is also modified & there is no typo error or case-sensitivity related errors.
    I m also printing classpath passed to JVM in the program. It has my included path "/home/top/atm", along with other system classpath(s).
    I m banging my head over this problem, since 2 days. Hence I tried to use reference implementation files. It still will not work..
    Can anyone pls be patient & help me. I'll really appreciate this.
    Thanks a lot,
    Following is the code of 2 files..
    Prog.java
    public class Prog
    public static void main(String[] args)
    System.out.println("Hello World" + args[0]);
    & invoke.c
    #include <jni.h>
    #define PATH_SEPARATOR ':' /* define it to be ':' on Solaris */
    #define USER_CLASSPATH "/home/top/atm" /* where Prog.class is */
    main() {
    JNIEnv *env;
    JavaVM *jvm;
    jint res;
    jclass cls;
    jmethodID mid;
    jstring jstr;
    jclass stringClass;
    jobjectArray args;
    #ifdef JNI_VERSION_1_2
    JavaVMInitArgs vm_args;
    JavaVMOption options[1];
    options[0].optionString =
    "-Djava.class.path=" USER_CLASSPATH;
    vm_args.version = 0x00010002;
    vm_args.options = options;
    vm_args.nOptions = 1;
    vm_args.ignoreUnrecognized = JNI_TRUE;
    /* Create the Java VM */
    res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
    #else
    JDK1_1InitArgs vm_args;
    char classpath[102400];
    vm_args.version = 0x00010001;
    JNI_GetDefaultJavaVMInitArgs(&vm_args);
    /* Append USER_CLASSPATH to the default system class path */
    sprintf(classpath, "%s%c%s",
    vm_args.classpath, PATH_SEPARATOR, USER_CLASSPATH);
    vm_args.classpath = classpath;
    /* Create the Java VM */
    res = JNI_CreateJavaVM(&jvm, &env, &vm_args);
    fprintf(stderr, "JVM Created !!! with # %d\n", res);
    #endif /* JNI_VERSION_1_2 */
    if (res < 0) {
    fprintf(stderr, "Can't create Java VM\n");
    exit(1);
    fprintf(stderr, "ClassPath is : %s\n", classpath);
    cls = (*env)->FindClass(env, "Prog");
    if (cls == NULL) {
    goto destroy;
         fprintf(stderr, "Class Found !!\n");
    mid = (*env)->GetStaticMethodID(env, cls, "main",
    "([Ljava/lang/String;)V");
    if (mid == NULL) {
    goto destroy;
    jstr = (*env)->NewStringUTF(env, " from C!");
    if (jstr == NULL) {
    goto destroy;
    stringClass = (*env)->FindClass(env, "java/lang/String");
    args = (*env)->NewObjectArray(env, 1, stringClass, jstr);
    if (args == NULL) {
    goto destroy;
    (*env)->CallStaticVoidMethod(env, cls, mid, args);
    destroy:
    if ((*env)->ExceptionOccurred(env)) {
    (*env)->ExceptionDescribe(env);
    (*jvm)->DestroyJavaVM(jvm);
    ----------------------------------------

    Hi , I got the exact same problem as you did. Can you
    please let me know if you solve this issue already ?When FindClass returns null it means it threw an exception. The first step is to get that exception and print it out.
    The error is probably class not found. And just as with java only that means your class path is not correct.

Maybe you are looking for

  • Cost Of Replacing Hard Drive On 4th Gen iPod

    I just want to know the cost of replacing the hard drive on my 20 GB iPod, 4th generation. Is it worth repairing or should I just buy a new one?

  • Want to write my personal Arch_Install Script, help please..

    Hi, guys, I want to write a script to make my arch-installation automatic. The following is my personal procedures I follow to install my Arch. I am wondering is there any way I can make it automatic instead of input every command manually, for examp

  • So does anyone from Apple read the posts on here

    With the battery drain issues being experienced by so many, especially those with iPhone 5, I'm wondering if anyone from Apple may have actually read these posts.With all due respect to the experts, it is clear to me that the iOS 7.1 update is causin

  • Basic problem in Multiprovider

    Hi, I have created multiprovider on 2 ODS Objects. Example: The structure and data in <b>My 1st ODS</b>: DOCNO    CUSTID    INV_AMOUNT    AMOUNT_PAID 1001         C01         500                    200 The structure and data in <b>My 2nd ODS</b>: DOC

  • Displaying Metadata in ATV2

    The only information that I can see or display on the TV is: the name of movie, genre: length: Before the latest update I could see info that I put into Video/Description (in iTunes). So now all I have is the name of the movie and not the actors, dir