BAPI to extend the consumer view of BP
We are using this bapi to create the general view of the BP (both person & org)
BAPI_BUPA_CREATE_FROM_DATA
If we want the program to extend this to the consumer CRM006 or other role, which BAPI or function should the program call?
Thanks,
Glenn
Hi Glenn,
Follow below code, this is for extending BP roles using BAPI
DATA : role LIKE bapibus1006_head-partnerrole.
DATA : i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA : l_bpid TYPE bapibus1006_head-bpartner.
i_rcomm TYPE bapiret2.
role = 'CRM000'.
l_bpid = '000256'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = l_bpid
IMPORTING
output = l_bpid.
CALL FUNCTION 'BAPI_BUPA_ROLE_ADD'
EXPORTING
businesspartner = l_bpid
businesspartnerrole = role
DIFFERENTIATIONTYPEVALUE =
TABLES
return = i_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
Hope this will help you
Siva
Similar Messages
-
Extending the sales view...
Hi,
I am creating a material using MM01 TC (for 5 views--Basic data1,2, purchasing, Accounting1,2) and extending the same material to diff plant and storage location using Zprogram(dialog programming) and also creating two more view additionaly (sales view and MRP view). Here we are submitting the values as file through the material master std input program for extending the material as well as creating two additional views for that material..
But after executing, I am getting the error as " You are not fully maintained the tax classification". So the material is not getting created.
I am passing the values for tax classification TAXM1 ...values in both the structures BMMH1, BMMH2.
Also in the header structure BMM00 -- I am passing the indicator as 'X' for the sales view and MRP view .
Is I am missing any fields? Why I am not able to extend the material?
Regards,
Justin.Hi,
Generally same valuation class is used in all the vauation areas because the material grouping and categorization is done at company level.So while extending the material you can extend with the same valuation class.
And while extending the sales views you have to take confirmation from the sales department about the values in the sales views.Here also you need not worry about the GL accounts at the time of extending the materials.The revenue posting assignments will be taken care by sales consultant.
The automatic account determination is carried out depending on your configuration.
We can configure automatic postings in the following ways:
1.Direct posting to GL account.
2.Valuation class and GL account.
3.Valuation grouping code,valuation class and GL accounts.
Depending on the configuration (in your case 3rd) system will check the valuation grouping code then valuation class then GL account.
Regards,
Rambhupal reddy -
How to extend the costing view for a material
How to extend the costing view for a material
Use MM01 Trxn code and Select Material and Select Costing Views and Maintain, Save it.
Else Use MM50 and Select Material and Mainenance Status as G Costing and Execute, Maintain & Save. -
Calling and displaying BAPI values when the initial view is displayed
hi Gurus,
I am creating an application where I am calling a BAPI.
Now my problem is that the values should be called and displayed when I am starting the application ie in the first view itself.
Is there any way to execute the BAPI so as to retrieve the values from back end and get the values displayed in the initial screen/view.
Or else is there any onPageLoad method which can be used in such cases.
please help me how to go ahead.
Thanks and regards,
krisHi
Create a method in controller and insert the code,
wdContext.current<BAPI>Element().modelObject().execute();
And call the method in view, and check the size of BAPI's output node.If it is greater than 0, your BAPI is returning something. using any loop and get the Output
Saravanan K -
Extending the Seeded View, Join query possible??
I am extending a seeded VO(oracle.apps.pos.changeorder.server.PoViewLinesVO). Thsi VO has teh attributes of polineid, poheaderid,...
In my custom VO where i ame xtending the PoViewLinesVO, there i need to take the fields attribute_category and attribute1 from po_lines_all table, here in custom VO i need to pass the "polineid" from the seeded VO, and tehn i have to take its respective "attribute_category and attribute1". How can i do this, can its possible to write some join condition or through controller only its possible?
Please help me....You can write the custom sql with joins in the extended VO.
--Shiv -
MM50 Extend Mtrl costing view, but after maintaining costing view in OMS2.
Hello Sap Gurus,
I have a Unique Issue, i have created few 1000s Materials with material type ZDEN, now initially while creating these materials the costing View was not selected in the Material Type,
but after creating this 1000s of material under ZDEN material type, now we require Costing View to be maintained for this material which are already created,
so as an option we went to the material type ZDEN in OMS2 and extended the costing Views for the material type,
now if i go to MM50 to extend material costing views I'm not able to extend the costing view for the materials, it gives me an error no materials selected,
but alternately if i try extending the costing views individually for each material by MM01 transaction it allows me to extend costing views to the material selected,
is there any bug or issue note to be applied or any solution for this mass extension of views in material master, any bapi to extend Materials of this scenario,
Awaiting your reply,
Thanks and regards
S Kumarwhen you create a material master after initial customizing of OMS2 then SAP writes the possible views into table MOFF
If you then do customizing in OMS2 and add the costing view, this is not updated for all your exsting materials
Hence you dont get them via MM50 because it selects the materials based on entries in MOFF, but you can extend with MM01 as SAP checks the current customizing.
execute transaction OMSM which can rebuilt the table and see if you then get your materials in MM50 -
Unable to extend the VO ConsInvTableVO in the iReceivables page
Hi All,
I am getting the error message "Each row in the Query Result Columns must be mapped to a unique Attribute in the Mapped Entity columns" when I am trying to extend view object ConsInvTableVO in iReceivables page. Though there were many posts available for the error, I have tried the solutions like
1. modifying the option in step1 of wizard from Read-Only to Updatable, but still error exists.
My requirement is to add an new column, but even without modifying the SQL query in the extended VO, I am facing this error at step4 in VO wizard.
There are some transient attributes in the standard VO like TransactionDetailsRegionCode, AmountDueRemainingFormatted, AmountDueOriginalFormatted, IrSalesOrder, TransactionDetailsClass, LkpCodeStatusMeaningModified which I think were causing the issue.
Please let me know whether any workaround/solution is available.
Regards,
Ramakrishnan
Edited by: 877977 on Sep 1, 2011 3:51 AMHi Pratap,
Thanks a lot for your reply. The problem is I am unable to extend the standard view object in Jdev itself. I think there is an view link exists in the VO. When I uploaded the java files and xml file of the VO "oracle.apps.ar.irec.accountDetails.server.ConsInvTableVO" in my local JDev, I got an error msg that "Could not find the following referenced objects oracle.apps.ar.irec.accountDetails.server.InvoiceDetailsVO".
Later I uploaded the files of that referenced VO also in the JDev. Let me know how to extend the View object which is having view link.
Regards,
Ramakrishnan -
Hi Friends,
Please let me know how to extend the List view 100 to more in transaction BP.
Regards
Rickyhi frnd....
u can use this code once
CALL FUNCTION 'BAPI_BUPA_ROLE_ADD_2'
EXPORTING
businesspartner = customer_data-partner
BUSINESSPARTNERROLECATEGORY =
ALL_BUSINESSPARTNERROLES = ' '
businesspartnerrole = <wg_part_grp05-partnrole>
DIFFERENTIATIONTYPEVALUE =
VALIDFROMDATE =
VALIDUNTILDATE = '99991231'
TABLES
return = tbl_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_wait
IMPORTING
return = tbl_return.
I have tried.....its working for both standard roles and also for custome roles -
How to find the Names of Most costly Views or Most Time consuming views
Hi All,
I had a database consisting of almost 200 views,as a part of Optimization process i want to find out the most costlier views.How to do that.Actually i want the names of the VIEWS,so that i can optimize that.Can any one help me out?
I had one more doubt in our Database a view is created like view A( which is created by joining several tables).so do i need to add index on this view separately or does it take the index of the tables which i joined? And in our Database i had created
a VIEW which is derived from other views(the Joining objects are views not tables),so while i select recoreds from this views which is derived from other views it is taking a lot of time.Is tehre any problem with that?Please avoid such double post spread over several forums:
http://social.msdn.microsoft.com/Forums/en-US/bae4042a-10b8-4d12-aa46-88a05ea37a76/how-to-find-the-names-of-most-costly-views-or-most-time-consuming-views?forum=sqldataaccess
Olaf Helper
[ Blog] [ Xing] [ MVP] -
If VL are there to that particular VO,Is it necessary to extend the view li
Hi Folks
if VL are there to that particular VO,Is it necessary to extend the view links also while extending VO?
appriciate any pointers
Regards
Harryhi
you dont need to extend the view links ,it will be taken care by VO extension ,but when you check VORow impl of standard VO ,there you will find the refence of all VO which are having link with this standard VO ,that code you need to copy paste in your extended VORowImpl .
Thanx
Pratap -
Creating a material with just the basic view using BAPI
Hi
I intend to create a new material with just the basic view using BAPI BAPI_MATERIAL_SAVEDATA -
To do this - I believe I have to fill in the structure HEADDATA data - ( mandatory ) with the required values - I fill values for fields IND_SECTOR, MATL_TYPE & basic view ( check this field ) and leave the MATERIAL field as blank (assuming internal numbering ) and then fill values of the CLIENTDATA structure with values for the basic data view.
Is this correct ? Will my material number created be returned in the RETURN structure - how do I look for the material number exclusively in my RETURN structure ?hi
good
go through this progarm which ll give you detail idea about BAPI_MATERIAL_SAVEDATA
REPORT ZBAPIMM01 LINE-SIZE 255 NO STANDARD PAGE HEADING
LINE-COUNT 065(001).
TABLES: T001L, "Storage Locations
MARA, "General Material Data
MAKT, "Material Descriptions
MBEW, "Material Valuation
MARC. "Plant Data for Material
DATA: BAPI_HEAD LIKE BAPIMATHEAD,
BAPI_MAKT LIKE BAPI_MAKT, "Material Description
BAPI_MARA1 LIKE BAPI_MARA, "Client Data
BAPI_MARAX LIKE BAPI_MARAX,
BAPI_MARC1 LIKE BAPI_MARC, "Plant View
BAPI_MARCX LIKE BAPI_MARCX,
BAPI_MBEW1 LIKE BAPI_MBEW, "Accounting View
BAPI_MBEWX LIKE BAPI_MBEWX,
BAPI_RETURN LIKE BAPIRET2.
DATA: BEGIN OF INT_MAKT OCCURS 100.
INCLUDE STRUCTURE BAPI_MAKT.
DATA: END OF INT_MAKT.
DATA: BEGIN OF INT_MAT OCCURS 100,
WERKS(4), "Plant
MTART(4), "Material type
MATNR(18), "Material number
MATKL(9) , "Material group
MBRSH(1), "Industry sector
MEINS(3), "Base unit of measure
GEWEI(3), "Weight Unit
SPART(2), "Division
EKGRP(3), "Purchasing group
VPRSV(1), "Price control indicator
STPRS(12), "Standard price
PEINH(3), "Price unit
SPRAS(2), "Language key
MAKTX(40), "Material description
END OF INT_MAT.
SELECT-OPTIONS:
PLANT FOR MARC-WERKS OBLIGATORY MEMORY ID PLT,
MATERIAL FOR MARA-MATNR MEMORY ID MAT,
MATLTYPE FOR MARA-MTART MEMORY ID MTY,
DIVISION FOR MARA-SPART MEMORY ID DIV.
PARAMETERS: F_FILE LIKE RLGRAP-FILENAME
DEFAULT 'C:\DATA\ZMATERIAL.XLS' MEMORY ID F_FILE,
GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk
UPDDATA AS CHECKBOX. "Tick to update date to Materials Master
IF GETDATA = 'X'.
PERFORM DOWNLOAD_DATA.
PERFORM DOWNLOAD_FILE.
ENDIF.
IF UPDDATA = 'X'.
PERFORM UPLOAD_FILE.
PERFORM UPDATE_MM.
ENDIF.
FORM DOWNLOAD_DATA.
SELECT * FROM MARC WHERE LVORM EQ ' '
AND WERKS IN PLANT
AND MATNR IN MATERIAL.
CLEAR MARA.
SELECT SINGLE * FROM MARA WHERE MATNR = MARC-MATNR.
CHECK MATLTYPE.
CHECK DIVISION.
CLEAR MBEW.
SELECT SINGLE * FROM MBEW WHERE MATNR = MARC-MATNR
AND BWKEY = MARC-WERKS.
CLEAR MAKT.
SELECT SINGLE * FROM MAKT WHERE SPRAS = 'EN'
AND MATNR = MARC-MATNR.
WRITE:/ MARC-WERKS, "Plant
MARA-MTART, "Material type
MARA-MATNR, "Material number
MARA-MATKL, "Material group
MARA-MBRSH, "Industry sector
MARA-MEINS, "Base unit of measure
MARA-GEWEI, "Weight Unit
MARA-SPART, "Division
MARC-EKGRP, "Purchasing group
MBEW-VPRSV, "Price control indicator
MBEW-STPRS, "Standard price
MBEW-PEINH, "Price unit
MAKT-SPRAS, "Language key
MAKT-MAKTX. "Material description
INT_MAT-WERKS = MARC-WERKS. "Plant
INT_MAT-MTART = MARA-MTART. "Material type
INT_MAT-MATNR = MARA-MATNR. "Material number
INT_MAT-MATKL = MARA-MATKL. "Material group
INT_MAT-MBRSH = MARA-MBRSH. "Industry sector
INT_MAT-MEINS = MARA-MEINS. "Base unit of measure
INT_MAT-GEWEI = MARA-GEWEI. "Weight Unit
INT_MAT-SPART = MARA-SPART. "Division
INT_MAT-EKGRP = MARC-EKGRP. "Purchasing group
INT_MAT-VPRSV = MBEW-VPRSV. "Price control indicator
INT_MAT-STPRS = MBEW-STPRS. "Standard price
INT_MAT-PEINH = MBEW-PEINH. "Price unit
INT_MAT-SPRAS = MAKT-SPRAS. "Language key
INT_MAT-MAKTX = MAKT-MAKTX. "Material description
APPEND INT_MAT.
CLEAR INT_MAT.
ENDSELECT.
ENDFORM.
FORM DOWNLOAD_FILE.
call function 'WS_DOWNLOAD'
EXPORTING
FILENAME = F_FILE
FILETYPE = 'DAT'
FILETYPE = 'WK1'
tables
data_tab = INT_MAT
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC = 0.
FORMAT COLOR COL_GROUP.
WRITE:/ 'Data Download Successfully to your local harddisk'.
SKIP.
ENDIF.
ENDFORM.
FORM UPLOAD_FILE.
call function 'WS_UPLOAD'
EXPORTING
FILENAME = F_FILE
FILETYPE = 'DAT'
FILETYPE = 'WK1'
tables
data_tab = INT_MAT
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC = 0.
FORMAT COLOR COL_GROUP.
WRITE:/ 'Data Upload Successfully from your local harddisk'.
SKIP.
ENDIF.
ENDFORM.
FORM UPDATE_MM.
LOOP AT INT_MAT.
Header
BAPI_HEAD-MATERIAL = INT_MAT-MATNR.
BAPI_HEAD-IND_SECTOR = INT_MAT-MBRSH.
BAPI_HEAD-MATL_TYPE = INT_MAT-MTART.
BAPI_HEAD-BASIC_VIEW = 'X'.
BAPI_HEAD-PURCHASE_VIEW = 'X'.
BAPI_HEAD-ACCOUNT_VIEW = 'X'.
Material Description
REFRESH INT_MAKT.
INT_MAKT-LANGU = INT_MAT-SPRAS.
INT_MAKT-MATL_DESC = INT_MAT-MAKTX.
APPEND INT_MAKT.
Client Data - Basic
BAPI_MARA1-MATL_GROUP = INT_MAT-MATKL.
BAPI_MARA1-BASE_UOM = INT_MAT-MEINS.
BAPI_MARA1-UNIT_OF_WT = INT_MAT-GEWEI.
BAPI_MARA1-DIVISION = INT_MAT-SPART.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-DIVISION = 'X'.
Plant - Purchasing
BAPI_MARC1-PLANT = INT_MAT-WERKS.
BAPI_MARC1-PUR_GROUP = INT_MAT-EKGRP.
BAPI_MARCX-PLANT = INT_MAT-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
Accounting
BAPI_MBEW1-VAL_AREA = INT_MAT-WERKS.
BAPI_MBEW1-PRICE_CTRL = INT_MAT-VPRSV.
BAPI_MBEW1-STD_PRICE = INT_MAT-STPRS.
BAPI_MBEW1-PRICE_UNIT = INT_MAT-PEINH.
BAPI_MBEWX-VAL_AREA = INT_MAT-WERKS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
WRITE:/ BAPI_HEAD, BAPI_MARC1.
call function 'BAPI_MATERIAL_SAVEDATA'
exporting
HEADDATA = BAPI_HEAD
CLIENTDATA = BAPI_MARA1
CLIENTDATAX = BAPI_MARAX
PLANTDATA = BAPI_MARC1
PLANTDATAX = BAPI_MARCX
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
STORAGELOCATIONDATA =
STORAGELOCATIONDATAX =
VALUATIONDATA = BAPI_MBEW1
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA = BAPI_MVKE1
SALESDATAX = BAPI_MVKEX
STORAGETYPEDATA =
STORAGETYPEDATAX =
IMPORTING
RETURN = BAPI_RETURN
TABLES
MATERIALDESCRIPTION = INT_MAKT
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
IF BAPI_RETURN-TYPE = 'E'.
WRITE:/ 'Error Message ', BAPI_RETURN.
ENDIF.
ENDLOOP.
ENDFORM.
*---End of Program
thanks
mrutyun^ -
Hello Experts,
I m totally new for BAPI.
My req is to extend the material of type "Raw Material",in which I have to select view Basic Data1,
Basic Data1,Purchasing, Purchase Order Tex,MRP1,MRP2,MRP3,MRP4,Forecast.
I search sdn, I got to know this can b achieved using BAPI_MATERIAL_SAVEDATA,
Can anybody provide some hint or code for the same.
Ravihi,
Refer to the link.
http://abaplovers.blogspot.com/2008/06/sap-abap-creating-material-using-bapi_02.html
Re: BAPI Material Creation
Regards
Sumit Agarwal -
Changing the default view for material
Hi,
I am trying to add views using MM02. It is showing me just 5 views ...BASIC DATA1, BASIC DATA2 etc..... I want to add other views eg, Quality Management but am not able to do it.
I tired doing the following:
Go to mm01
- Enter the material for which you want to add the views.
- Then you enter the same material in copy from material
- Then you may find all the view
- Then select the views you want to add and make entries in the same view and save it
Are the view material specific?
Thanks,
ShelinaGo to SPRO and follow the path
SAP Customizing Implementation Guide
-->Logistics - General
-->Configuring the Material Master
-->Basic Settings
-->Material Types
-->Define Attributes of Material Types
If you pick the material type of the material that you are trying to extend, you will find the views that are allowed under "User Departments". -
How do I extend the storage space on my iphone?
Hi Guys
I want to extend the storage space across my idevices since my wife can't stop taking photos of our new addition to the family on her iphone.
We already both use iTunes Match so there is music on our phones it's all streamed off the cloud which works well I can recommend this.
The problem now comes from the fact we now need extra storage space for photos and videos taken on ios. Photo stream does a good job of syncing photos across devices but not video. It would be nice if iCloud did this but found that it fell short of the mark on anything but backing up my iphone since the things it stores in the cloud seem limited.
Dropbox seems like a good alternative to this since it will work on all devices but may require management on a separate computer and am not sure if it will work with streaming video I guess I can give it a go and see.
Has anybody got a good experience with photo / video streaming across idevices that they can share?
Regards
ChrisHi
Thanks for your response.
Buying a bigger iphone was just too obvious an answer.
We already have the backup to mac in place it just means that to view pics that you need to turn on the big machine.
I would rather have them available to view via a cloud service of some kind.
Anyone have any experiences to add?
Regards
Chris -
MM50 : add new column in the material view
Dear guru.
I need to add a new column of material master in the material view of MM50.
Do you have a solution (exit) in order to solve my problem ?
Thanks.> I need to add a new field in the MM50 transaction not in MM02.
Der Friend,
Pls be specific about your query. As you know MM50 is for material view extension which is a std SAP trxn to help extend the views set by standard SAP pack and if you are referring new field as a new view then it is not so easily approachable.
Shiva
Maybe you are looking for
-
Four finger swipe is there in 10.5.6
Just upgraded to 10.5.6 and I now have access to the 4-finger swipe gesture... MBA (2nd generation)
-
How to transfer an iWeb site from one MobileMe account to another.
I am creating an iWeb site for a friend. I am doing this using my mac and my MobileMe account. I understand that the iWeb site assets are all stored in my MobileMe iDisk. I want to take the finished site and transfer it to my friends computer and his
-
Problem adding classpath for managed server in 10.3
Hi All, I have a managed server that uses startup classes. According to the documentation, you have to put the absolute path to the startup classes in the server's classpath. I go to the server's configuration and the Server Startup tab to enter the
-
My mac mini sudenly frozed and won't boot in again.
while i surf the net with safari, safari just close itself and the screen was dim with a message to restart . after i do restart my mac mini it can't log in to os and fail to install new os from cd. i did test hardware and it error 4MEM/1/40000000 .
-
Hi Sir I am trying to extract the data from XML through select query. I am getting the error as follows ORA-19025 EXTRACT VALUE RETURNS VALUE OF ONLY ONE NOTE. SELECT x.empno, substr(extractvalue(x.xml_data,'/data/index/emp/ename/text()'),1,20 as ena