cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FM/ BAPI to Upload / Change Purchase Information Records (PIR ME11) with pricing conditions

Former Member
0 Kudos
2,729

Hi all


I have a requirnment to create a tool to mass  Upload create / Change Purchase Information Records (PIR) with pricing conditions,

and give a output with the return message ,like  Info record is created or not .


I got the below FMs and BAPIs


ME_INITIALIZE_INFORECORD

(ME_DIRECT_INPUT_INFORECORD  - Create new entries in PIR

  oR

ME_MAINTAIN_INFORECORD - Change the PIR)

ME_POST_INFORECORD

'ME_UPDATE_INFORECORD_COND

'BAPI_TRANSACTION_COMMIT'.


I am passing the basic parameters  in  ME_DIRECT_INPUT_INFORECORD


*EINA
wa_eina-matnr = '000000000000059980'.
wa_eina-lifnr = '0000830039'.
wa_EINA-TXZ01 = 'testdd1'.
wa_EINA-SORTL = 'F'.
wa_EINA-MEINS = 'EA'.
wa_EINA-MAHN1  = '10'.
wa_EINA-MAHN2  = '15'.
wa_EINA-MAHN3  = '20'.
wa_EINA-LMEIN  = 'EA'.

************************************************
wa_eine-ekorg = 'AWSL'.
wa_eine-ekgrp = 'LC1'.
wa_eine-WAERS = 'GBP'.
wa_eine-MINBM  = '50'.
wa_eine-NORBM  = '100'.
wa_eine-APLFZ  = ' 10'.
wa_eine-NETPR  = '100'.
wa_eine-EFFPR  = '100'.
wa_eine-BSTMA  = '500'.


CALL FUNCTION 'ME_DIRECT_INPUT_INFORECORD'

  EXPORTING

    activity         = 'V'

    i_eina           = wa_eina

    i_eine           = wa_eine

    i_no_suppose     = ' '

    i_vorga          = 'A'

  IMPORTING

    e_eina           = wa_eina_new

    e_eine           = wa_eine_new

  TABLES

    t_head           = it_head

    t_line           = it_line

  EXCEPTIONS

    textname_invalid = 1

    OTHERS           = 2.


but every time I am getting error . and Info record is not created 

Errors : "You have not entered a planned delivery time"(But I hav entered it in wa_eine-APLFZ  ) 


kindly let me know where I m going wrong . or any alternative method to create a Info record with pricing condition  and get the result message as output.

I cannot use BDC .

Thanks & Regards


Kakoli

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

You can use FM , ME_INFORECORD_MAINTAIN for info record creation and change. ME11/12.

Also make sure to call bapi_transaction_commit .

JL23
Active Contributor
0 Kudos
tomas_talpa
Active Contributor
0 Kudos

Hi Kakoli,

as for error "You have not entered a planned delivery time" -- try to fill the import parameter I_NO_SUPPOSE, that should suppres the reading of default data from Vendor Master (I have to admit it was pretty long time when I've been using this FM, this is just something I found in my notes).

Kind Regards

TomT