Business partner auto code generation
hi how to create business partner auto code generation. its based on customer group for example we have more customer group..dealer, distributor,subcontractor...
here dealer and distributor group starting cardcode is - C000001,C000002,C000003..... etc
when i was choose subcontractor its starts SUB00001,SUB00002...... etc
vendor is maintain same starting letter in all groups V000001,V000002
Thanks in advance
Thanks & Regards
B.Lakshmi Narayanan
hi thanks for your valuable replies...
i changed the codes...pls check its right or wrong
declare @temp as char(20)
IF $[OCRD.GroupCode] = 104 and $[OCRD.cardtype] = 'c'
BEGIN
set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where (groupcode= 104) and (len(cardCode)=7))
set @temp='TRA'isnull(replicate(0,7-len(@temp)),'')@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.cardtype] = 'C'
BEGIN
set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where (len(cardCode)=7))
set @temp='C'isnull(replicate(0,7-len(@temp)),'')@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.cardtype] = 'S'
BEGIN
set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where (len(cardCode)=7))
set @temp='S'isnull(replicate(0,7-len(@temp)),'')@temp
select cast(@temp as char(20))
END
Thanks & Regards
B.Lakshmi Narayanan
Similar Messages
-
Creating Business Partner Through Code
Hi Everyone
I just wanted to know if any of you knew a way to create a business partner through code.
If there is a way or a sample that anyone can provide that would greatly
apreciated.
What would mandatory fields be? I know CardCode would be one mandatory field but what else would be essential?Hi Sebastiano,
If you only need to read the BP data from the 'source' company then you shouldn't need to log in to it. The RecordSet object should be capable of sending a SQL query that references the other database.
For example:
string sSQL = "select * from " + sSourceDatabase +"..OCRD where CardCode = '" + sMyBPCode +"'"
where sSourceDatabase is the Database ID for the source company and sMyBPCode is the BP you wish to copy.
Using this you should only need to log in to the company where the BP needs to be created. So the whole process should be something like this:
1) Connect to second company
2) Run the query to collect the BP data from the first company
3) Create an instance of the BP object and use the recordset object to assign the properties
4) Add the BP
Hope this makes sense
Owen
P.S. The other option is to use XML. See this post:
Copy items between databases -
Case created without business partner, reason code and result code
In our CRM system, some cases was created without business partner, reason code and result code.
We created some customer functions to make these fields as mandatory, it always work for our technique people and process expert, but it didn't work for some users occasionally. We cannot debug it.
Can anyone tell me why and how to solve it?
Please help me !
Regards,
ShirleyHello Shirley,
Well, then I would check the code, which calls your custom function modules.
It may be possible, that you have an IF in the 'Main' program, which makes it possible to skip the custom FM for these users.
The reason I am assuming this, is that normally you need just to change attributes for a field to make it mandatory, or customizing like SHD0 makes this possible. If you use custom FM, you have to call them somewhere and this is the point I would be looking for.
Check the traces for the users and you should find, that the custom FM are not called for them.
My opinion, of course
Award points if this helps.
Regards,
Martin Kuma -
Refactor - Renaming Problem Auto Code Generation
After renaming the java source files (backing beans) to upper case letters (ex. from console.java to Console.java),
JSC is not able to instantiate this class anymore, because the managed-bean.xml is altered automatically.
The next problem is the jsp-file. JSC produces some useless code which points to the new (by JSC) created managed beans (old ones still exist)
example (jsp):
</ui:body>
</ui:html>
</ui:page>
</f:view>
<ui:body binding="#{request$console.body1}" id="body1"/>
(managed-beans.xml)
<managed-bean>
<managed-bean-name>request$console</managed-bean-name>
I�m not able to delete this generated code, because after saving and reloading the jsp-file the inserted code is still there.
In the projects view my java source files are shown in small letters, even if the files are in upper case on the file system (explorer).
I�m using Studio Creator 2 Update 1 (Build 060915)
The project can only be deployed (exporting *.war in JSC) and executed when i change the file attributes to read-only after editing them with a standard text editor.
Any suggestions?Hi Naveen,
I found these two fms's which would enable automatic item code generation. See if it helps you.
declare @temp as char(20)
IF $[OITM.ItmsGrpCod] = 101
BEGIN
set @temp=(select isnull(max(right(ItemCode,4)),0) + 1 from OITM where (ItmsGrpCod= 101) and (len(ItemCode)=7))
set @temp='DRM'+isnull(replicate(0,4-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OITM.ItmsGrpCod] = 102
BEGIN
set @temp=(select isnull(max(right(ItemCode,4)),0) + 1 from OITM where (ItmsGrpCod= 102) and (len(ItemCode)=7))
set @temp='PKG'+isnull(replicate(0,4-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
And:
DECLARE
@NUM AS CHAR(7)
SET @NUM =
(SELECT RIGHT(MAX(CardCode), 7) FROM OITM)
SET @NUM = @NUM + 1
BEGIN
IF @NUM IS NULL OR @NUM = 0
BEGIN
SELECT 'I0000001'
END
IF @NUM < 10
BEGIN
SELECT 'I000000' + @NUM
END
IF @NUM > 9 AND @NUM < 100
BEGIN
SELECT 'I00000' + @NUM
END
----COMPLETE THE CODE
END
Thanks,
Joseph -
Add fields to Business partner t-code BP
Hi All,
I have a requiremnt to create a BP in the counterpary role .
1.This requirement involves to add some custom fields to the table control of the payment details table control in the company code view.I have tried EEWB and BPT ,but both of them creates a new customer data tabstrip .
Any ways to add additional custom fields to the existing table control.
2. where can we find the assignmet of fields to the field groups in r3 side to maintain the BP transaction.
Regards,
Prabhu.Hi Prabhu,
Your approach is on the correct path. Basically, this is what you need to do -
1. Create the new fields using EEW. Let this create a new tab.
2. Hide this tab for all roles, EXCEPT the role for which you want to see it. You can do this in SPRO.
3. You can assign fields to field groups in transaction BUPT-> Control-> expand the menus and you will see Screens, Sections, Views, Field groups... choose field groups and within this menu you can assign fields to field groups.
Hope this helps you.
Cheers,
Rishu. -
Hi everyone,
I am new to using LabVIEW (I've come from a background of C/C++, Java, Perl, etc...) and have learned quite a bit about using LabVIEW 7.0. But what I am finding is that it is horrible about code reuse. Apparently, from what I can gather, if I wish to reuse code, I need to generate a VI template which is a fancy way of doing copy coding *shiver*.
So fine, if copy coding is the only way to generate reusable code, so be it, but is there a way of automatically replacing a static typedef with another automatically from a referencing VI? If I was coding this in C, I would use a sed script to search and replace the type name with another in the files, but given the binary nature of the .vi and .vit files, I don't think that this is an option.
I can't wait till we move over to LabVIEW 8.x which supports OOP as this will alleviate much of the problems I am seeing.
Any help anyone can give is greatly appreciated. Thank you for your time.
AdrianThat should have been
File >>> Save with options >>> single prompt >>> preserve hierachy
I wrote a VI that will clone rename and replace a typedef but it is in LV 7.1. Lacking that tool you will have to do the cloning by hand.
For your icon you use these methods.
And to save you asking about other things that will require scripting, see the Rusty nails on LAVA.
Ben
Message Edited by Ben on 10-03-2007 12:29 PM
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Attachments:
Icon.PNG 23 KB -
Business Partner Auto creation
Hello Experts,
We configured the customer to BP synchronization (CVI_1)
We are able to autocreate BP on creation of customers. However we want to disable the same but only create BPs for only few customers selectively by extending them through FLBPD1.
If anyone could guide us how can we achieve the above? We want the synchorization to remain, BP to get created by data from customer master but manual creation selectively through FLBPD1
VeenaHi Veena,
I think it not possible to keep the creation of BP as optional.
Once you have activated synchronization from customer to BP, always BP will gets created.
If you assigned any BP role to customer account group then BP will get created in that role or else BP will get created in general role.
rgds,
Srini -
How to transform a business partner (t-code BP) into a customer ? (XD01)
Hi expert,
I'm trying to figure out a way to transform (or duplicate) a BP (data are in table BUT000) into a customer (data in table KNA1) in sap ECC6.0. Is there a BAPI or any other way to do this ? Any help would be highly appreciated !
Thank you !
C.K.Hi Sai,
Thank you for the insightful answer, to my knowledge Bdocs require CRM, however we don't have CRM, just SAP ECC; I would like to do this within ECC itself.
Or is there a way to trigger bdocs nonetheless ?
Thanks !
C.K. -
Error while creating Business partner
Hello,
I am getting an error while creating a role in Business Partner (T.code BP). The error is given below:
Role 'contract partner' in IS-U not same as role from FS
Message no. E9450
Diagnosis
In IS-U or IS-T, you are not permitted to allocate the role Contract Partner and a role from Financial Services (role category begins with 'FL' or 'TR') to a business partner. This is due a conflict with regard to the corresponding customers
Procedure
Create another business partner as a duplicate.
Please assist.
Thanks & Regards,
VineetHi,
The error prompts you that you can not create a business partner in financial roles (TR*, FL*) where a role of contract partner is already assigned to same partner.
Please refer SAP Note - 1123452 and 1564107.
Regards
Prasad AV -
hi,
i am using following query for auto code generation group wise
declare @temp as char(20)
IF $[OITM.ItmsGrpCod] = 101
BEGIN
set @temp=(select isnull(max(right(ItemCode,6)),0) + 1 from OITM where (ItmsGrpCod= 101) and (len(ItemCode)=7))
set @temp='FAB'+isnull(replicate(0,6-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OITM.ItmsGrpCod] = 104
BEGIN
set @temp=(select isnull(max(right(ItemCode,6)),0) + 1 from OITM where (ItmsGrpCod= 104) and (len(ItemCode)=7))
set @temp='BRD'+isnull(replicate(0,6-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
but this does not increment code automatically every time it shows me FAB000001 and BRD000001
thanks
rahulSolved
-
Auto generation of Item Code And Business Partner
Hello All,
My client want to create Auto generation of Item Code And Business Partner with some prefix value.
Thanks
DeepakHi Dipak Patel,
i created BP code by BP Group use FMS . you can refer code.
declare @temp as char(20)
IF $[OCRD.GroupCode] =100
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =100) and (len(CardCode)=8))
set @temp='C11'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 102
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =102) and (len(CardCode)=8))
set @temp='C12'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 103
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =103) and (len(CardCode)=8))
set @temp='C13'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 104
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =104) and (len(CardCode)=8))
set @temp='C14'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 101
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =101) and (len(CardCode)=8))
set @temp='V11'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 105
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =105) and (len(CardCode)=8))
set @temp='V12'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 106
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =106) and (len(CardCode)=8))
set @temp='V13'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 107
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =107) and (len(CardCode)=8))
set @temp='V14'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 108
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =108) and (len(CardCode)=8))
set @temp='V15'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 109
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =109) and (len(CardCode)=8))
set @temp='V16'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.GroupCode] = 110
BEGIN
set @temp=(select isnull(max(right(CardCode,5)),0) + 1 from OCRD where (GroupCode =110) and (len(CardCode)=8))
set @temp='V17'+isnull(replicate(0,5-len(@temp)),'')+@temp
select cast(@temp as char(20))
END
thanks
H2 -
Code generation for business partner
Hi, all
In our scenario we need to assign a unique code to business partner record as soon as it is approved by data manager (in MDM workdlow). This assignment should be automatic. Next incremental number would suffice, but AutoID field can't be used for this purpose since it automatically assigns numbers even to new, still not approved records.
Some kind of this pseudocode in assignment would be great:
CODE = MAX(CODE)+1
Where MAX(FIELD) is a function returning maximal value in FIELD field in current table.
But I couldn't find such function in data manager standard functions list.
Can anyone suggest a solution?
Vadimhi thanks for your valuable replies...
i changed the codes...pls check its right or wrong
declare @temp as char(20)
IF $[OCRD.GroupCode] = 104 and $[OCRD.cardtype] = 'c'
BEGIN
set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where (groupcode= 104) and (len(cardCode)=7))
set @temp='TRA'isnull(replicate(0,7-len(@temp)),'')@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.cardtype] = 'C'
BEGIN
set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where (len(cardCode)=7))
set @temp='C'isnull(replicate(0,7-len(@temp)),'')@temp
select cast(@temp as char(20))
END
ELSE IF $[OCRD.cardtype] = 'S'
BEGIN
set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where (len(cardCode)=7))
set @temp='S'isnull(replicate(0,7-len(@temp)),'')@temp
select cast(@temp as char(20))
END
Thanks & Regards
B.Lakshmi Narayanan -
How to Create Business Partner with fix number in t-code :BP
Dear SIr,
Normally I will set number range for auto to create Business Partner. In case , If we would like to crea How to Create Business Partner with fix number in t-code :BP , howe to do?
Please kindly advise.
THnak you and best regards,
VimolDear Shobhit,
How to put the thread as you mentioned.
Best regards, -
Auto Assigning of Business Partner to a task
Hi Champions,
I have a situation where I have to assign a business partner as soon as joining happens to a default task and default role of the project through ABAP program.
I have been able to achieve the auto allocation of the business partner to default role using the BAPI BAPI_BUS2177_STAFFING_ADD. This creates a link in DPR_BUPA_LINK table also.
Now I am stuck as to how to assign this business partner to the default task. Which BAPI shall I use and what shall I pass as input to it achieve this.
It will be great help on hearing from on this.
Regards, SandeepHi
Logic can be like this:
Get GUID of Task of which is going to be default.
Once employee (BP) is created, the program (scheduled at backend) will run n use the FM u mentioned.
Niranjan
Let me know if you need more info !!! -
Business Partner Code when using *
Hi all,
In Business Partner code when the user want's to see all Business Partner and makes "*" appears the BP code, BP Name and Foreign Name.
All user see this information except one that doesn't see the Foreign Name.
Why?Hi Ad,
Thank you for your reply.
"Foreign Name" is already select in the Form Setting.
You say that "This is a setting per user" but i dont think so. In Form Setting of the "List of Business Partners" i add "Account Balance" to one user and ALL users see the same information.
Best regards,
Augusto Silva
Maybe you are looking for
-
New Home Movies from iTunes not showing up on Apple TV
I edit a lot of home movies in Final Cut. When I am done I use "Compressor" to convert the uncompressed movie files to an Apple TV format. The problem I am having now is that after I import them into iTunes they aren't showing up on either of my two
-
Star Office files as attachments treated as "zipped"
I just finally got around to upgrading my wife's iMac to Tiger - and it seems to have created a problem... She does some work for folks who use Star Office, and frequenty gets Star Office files as attachments. Under Panther, this was no problem - the
-
Problem with package python-pyparallel
I'm trying to install python-pyparallel. The problem is that after I install it I do in python: ">>> import parallel" And the module is not found. So I checked the package and, I'm not an expert but it doesn't have any binary or python file or anythi
-
JavaScript documentation in Acrobat 10 SDK
I just wanted to say a big Thank You to Adobe for providing the Acrobat 10 JavaScript documentation in PDF. This is very much appreciated!
-
Whenever I use my healing brush an error message pops up and I can't use it. How do I correct this problem? If I need to uninstall and reinstall PSE 7 will I lose all my tags or other items in the system?