Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data in a Custom Container during BDC

Former Member
0 Kudos

hello experts...

In Tcode ME21n, Text Tab i need to pass item info in header text custom container during bdc recording...

how to achieve this because when i try to record transaction ME21N in tcode SHDB i cannot capture which

field will i pass the item info.

BDC code:

 SAPLMEGUI  0014  X 
            BDC_OKCODE	=MEBACK
            BDC_SUBSCR	SAPLMEGUI                    0013SUB0
            BDC_SUBSCR	SAPLMEGUI                    0030SUB0
            BDC_SUBSCR	SAPLMEGUI                    2000SUB0
            BDC_SUBSCR	SAPLMEGUI                    1105SUB1
            MEPO_TOPLINE-BSART	                        NB
            MEPO_TOPLINE-SUPERFIELD	                10000003 NESTLE PRODUCTS SDN. BHD.
            MEPO_TOPLINE-BEDAT	                        01/28/2010
            BDC_SUBSCR	SAPLMEVIEWS               1100SUB1
            BDC_SUBSCR	SAPLMEVIEWS               4000SUB1
            BDC_SUBSCR	SAPLMEVIEWS               1200SUB2
            BDC_SUBSCR	SAPLMEGUI                    1102SUB1
            BDC_SUBSCR	SAPLMEGUI                    1230TABSTRIPCONTROL2SUB
            BDC_SUBSCR	SAPLMMTE                     0100TEXTS
            BDC_SUBSCR	SAPLMMTE                     0101EDITOR
            MEPOTEXT-EDITOR	                               1
            BDC_SUBSCR	SAPLMEVIEWS              1100SUB2
            BDC_SUBSCR	SAPLMEVIEWS              4001SUB1
            BDC_SUBSCR	SAPLMEVIEWS              1200SUB2
            BDC_SUBSCR	SAPLMEVIEWS               2000SUB1
            BDC_SUBSCR	SAPLMEVIEWS               1100SUB3
            BDC_SUBSCR	SAPLMEVIEWS               4002SUB1
            BDC_SUBSCR	SAPLMEVIEWS               1200SUB2
            BDC_SUBSCR	SAPLMEGUI                     1301SUB1
            BDC_SUBSCR	SAPLMEGUI                     6000SUB1
            DYN_6000-LIST	                                        1
            BDC_SUBSCR	SAPLMEVIEWS                1000SUB2

Thank you

please help

8 REPLIES 8

Former Member
0 Kudos

ME21N appears to be an EnjoySAP transaction and therefore not suitable for batch input. Try ME21 instead.

Rob

0 Kudos

hello experts...

now my problem is passing tax code and cost center data, other data info was successfully transfered

but tax code and cost center did not...

 'X' 'SAPMM06E'	   '0111',                                                                                
' ' 'BDC_CURSOR'	   'EKPO-MWSKZ',
  ' ' 'BDC_OKCODE'	   '/00',
  ' ' 'EKPO-KNTTP'      WA_DETAIL-KNTTP,
  ' ' 'EKPO-MENGE'      LV_DARB1,
  ' ' 'RM06E-EEIND'     WA_DETAIL-EEIND,
  ' ' 'RM06E-LPEIN'     'D',
  ' ' 'EKPO-KZABS'      'X',
  ' ' 'EKPO-UNTTO'      '5',
  ' ' 'EKPO-WEPOS'      'X',
  ' ' 'EKPO-UEBTO'      '5',
  ' ' 'EKPO-MWSKZ'      WA_DETAIL-MWSKZ, ------> tax code
  ' ' 'EKPO-REPOS'      'X',
  ' ' 'EKPO-WEBRE'      'X',
 'X' 'SAPMM06E'	   '0511',
  ' ' 'BDC_CURSOR'	   'EKKN-SAKTO',
  ' ' 'BDC_OKCODE'	   '=ENTE',
*  ' ' 'EKKN-SAKTO'	   'EKKN-SAKTO',
  ' ' 'BDC_SUBSCR'	   'SAPLKACB  0001KONTBLOCK',

  'X' 'SAPLKACB'	   '0002',                       	
  ' ' 'BDC_CURSOR'	   'COBL-KOSTL',
  ' ' 'BDC_OKCODE'	   '=ENTE',
  ' ' 'COBL-KOSTL'	   WA_DETAIL-KOSTL,   -----> cost center
  ' ' 'BDC_SUBSCR'	   'SAPLKACB  0003BLOCK1',

please help

0 Kudos

and also...

I have a table control with multiple line item have the same vendor... If i select 3 line item having the same vendor

it will create a single po number.

how can i achieve this...

thank you

0 Kudos

What are the values in WA_DETAIL-MWSKZ and WA_DETAIL-KOSTL? Are you sure they contain values?

Rob

0 Kudos

hello yes they contain values

PAI code:

 PROCESS AFTER INPUT.
  MODULE PF_STATUS.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'PO_TABCTR'
  LOOP AT IT_DETAIL.
    CHAIN.
      FIELD WA_DETAIL-LIFNR.
      FIELD WA_DETAIL-MATNR.
      FIELD WA_DETAIL-MAKTX.
      FIELD WA_DETAIL-EKORG.
      FIELD WA_DETAIL-EKGRP.
      FIELD WA_DETAIL-BUKRS.
      FIELD WA_DETAIL-WERKS.
      FIELD WA_DETAIL-KOSTL.
      FIELD WA_DETAIL-MENGE.
      FIELD WA_DETAIL-NETPR.
      FIELD WA_DETAIL-EEIND.
      FIELD WA_DETAIL-MEINS.
      FIELD WA_DETAIL-MWSKZ.
      FIELD WA_DETAIL-KNTTP.
      FIELD WA_DETAIL-I_TEXT.
      FIELD WA_DETAIL-FLAG.
      MODULE PO_TABCTR_MODIFY ON CHAIN-REQUEST.
    ENDCHAIN.
    FIELD WA_DETAIL-CHK
      MODULE PO_TABCTR_CHK ON REQUEST.
  ENDLOOP. 

0 Kudos

hello this is the value...

WA_DETAIL-MWSKZ = I0

WA_DETAIL-KOSTL = S999

former_member555112
Active Contributor
0 Kudos

Hi,

Please try to avoid using BDCs on enjoy transactions.

The BDC will not work in background.

For adding header texts you can make use of SAVE_TEXT function module instead.

For creating/changing Purchase order make use of corresponding BAPI instead.

Regards,

Ankur Parab

0 Kudos

hello...

yes... i already did... Im using ME21 now....

but my prblem is tax code and cost center did not tranfer ...

please see my other query above...

tnx