Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: How to create a C Business Function?

  1. #1

    How to create a C Business Function?

    Hello,

    Can anyone help me how to create a C Business Function?

    I have tired to create while reading the PDF but still I am not clear about the procedure.

    Thank you

    E1 Consultant

  2. #2
    Senior Member
    Join Date
    Mar 2004
    Location
    Fort Worth, Texas
    Posts
    1,405

    Re: How to create a C Business Function?

    1. Create BSFN Object in OMW (B55xxxxx, B56xxxxx, etc.)
    2. Create Data Structs Objects (D55xxxxxA, D55xxxxxB, etc) for the functions that will be declared inside of your BSFN
    3. In BSFN Design Aid, create functions inside of BSFN. MyFunc1, MyFunc2, etc.
    4. In BSFN Design Aid, for each func created in step 3, assign DS created in step 2.
    5. In BSFN Design Aid, select Form|Create. Say yes to all prompts.
    6. Open the .h file generated in step 5. In BSFN Design Aid select a grid row for one of your funcs and select Row|Typedef, flip over to your .h file and paste contents, repeate for all funcs/grid rows.

    -- at this point you have a BSFN with function definitions and everything stubbed out --

    7. Compile (Build BSFN). If done correctly, you should get a clean complile.
    8. Open .c file, and start writing the actual logic so your functions will actually do something.
    9. repeate steps 7 and 8 until you get tired, bored or it actually works.
    Brian Oster
    Application Development Manager
    E1: 9.0 (TR9.1.5.1)
    JAS: Weblogic 12.1.2 (Win2012 64 bit)
    ES: Win2008 64 bit
    DB: MSSQL 2008
    WebDev Client: Win7Pro (64 bit)

  3. #3

    Re: How to create a C Business Function?


    Hi Boster,

    Thanks for the information; this is very helpful.

    I have tried on a simple adding Amout1 and Amount 2 values and assigned to Total.
    I have completed up to the step 7.Upto this stage its working fine. When I am going to write the logic I am not sure about the Variables declaration and how to pass the values.

    I heard about that some API's also to learn for C BSFN.

    So can you give some explanation of Sample Code with the same function that will be very helpful for me to understand the code.

    Thank You,
    Jashua
    E1 Consultant

  4. #4
    Senior Member
    Join Date
    Mar 2004
    Location
    Fort Worth, Texas
    Posts
    1,405

    Re: How to create a C Business Function?

    Thats kind of a loaded question for a forum. There are a lot of JDE C APIs for working with their objects and their data types as well as, depending on your release, a bunch of wrapper APIs for string manipulation and other 3rd party libraries. As far as examples go, you have apx. 600 megs worth of examples sitting on your hard drive.

    If you want to write C BSFNs I would give the following advice:

    1. You must have a strong knowledge of pure ANSI C, if you don't all ready have a firm foundation in ANSI C, I would stop right now with JDE C BSFNs and learn basic ANSI C. You don't have to be a C guru to write JDE C BSFNs, but trying to write JDE C BSFNs w/o knowing basic ANSI C is like trying to put a roof on a house before the foundation is poured.

    2. Read all the JDE developer guides especially any special guides on BSFNs, Unicode, etc.

    3. Look at existing pristine code for examples. There is really very little specific documentation on specific JDE API calls, most of what I have learned, I have learned by reverse engineering existing JDE code.
    Brian Oster
    Application Development Manager
    E1: 9.0 (TR9.1.5.1)
    JAS: Weblogic 12.1.2 (Win2012 64 bit)
    ES: Win2008 64 bit
    DB: MSSQL 2008
    WebDev Client: Win7Pro (64 bit)

  5. #5
    New Member
    Join Date
    Mar 2015
    Location
    Bengaluru,India
    Posts
    23
    Hi,

    I also started how to create C BSFN's in JDE. I did not find any relevant documents to it. can you please suggest me some of them?

    It will be really helpful to me.

    Thanks & Regards

  6. #6
    Member nkuebelbeck's Avatar
    Join Date
    Mar 2012
    Location
    Minnesota
    Posts
    471
    Quote Originally Posted by BOster View Post
    1. Create BSFN Object in OMW (B55xxxxx, B56xxxxx, etc.)
    2. Create Data Structs Objects (D55xxxxxA, D55xxxxxB, etc) for the functions that will be declared inside of your BSFN
    3. In BSFN Design Aid, create functions inside of BSFN. MyFunc1, MyFunc2, etc.
    4. In BSFN Design Aid, for each func created in step 3, assign DS created in step 2.
    5. In BSFN Design Aid, select Form|Create. Say yes to all prompts.
    6. Open the .h file generated in step 5. In BSFN Design Aid select a grid row for one of your funcs and select Row|Typedef, flip over to your .h file and paste contents, repeate for all funcs/grid rows.

    -- at this point you have a BSFN with function definitions and everything stubbed out --

    7. Compile (Build BSFN). If done correctly, you should get a clean complile.
    8. Open .c file, and start writing the actual logic so your functions will actually do something.
    9. repeate steps 7 and 8 until you get tired, bored or it actually works.
    10. flip a table

  7. #7
    New Member
    Join Date
    Feb 2012
    Location
    india
    Posts
    14
    Hi Nagendra/Jashua,

    If you want to learn on C - BSFN just start with simple BSFNs like B0400009 which is used to retrieve the company(CO) from F0901 by passing Account ID

    Regards
    Sujit R

  8. #8
    New Member
    Join Date
    Mar 2015
    Location
    Bengaluru,India
    Posts
    23
    Hi Sujith,

    Thanks for the advice. I am trying to write cache business function. I need to create cache to add values into the table and fetch from the cache. It should be done in application. Can you tell me tips how to write simple MBF using Begin doc,edit doc,end doc?

    Thanks & regards
    J. Nagendra.

  9. #9
    New Member
    Join Date
    Feb 2012
    Location
    india
    Posts
    14
    Hi Nagendra,

    Sure. You can reach out to me thru my mail ranadheer.eee@gmail.com. Cache BSFN will be useful particularly for temporary storage of data. So whenever there is a case of work file required to store the data temporarily, then we will prefer Cache BSFN for better performance. Please find the sample cache bSFN I have created to add, delete, update, fetch all, fetch select based on switch cases. It will be helpful to start on cache. Master BSFN delas with cache+transaction property, I guess. I hope mostly there will be no necessity to create master bsfns. Most of the time we will use standard MBFs.

    Regards
    Sujit R
    Attached Files Attached Files

  10. #10
    Quote Originally Posted by SUJIT RANADHEER A View Post
    Hi Nagendra,

    Sure. You can reach out to me thru my mail ranadheer.eee@gmail.com. Cache BSFN will be useful particularly for temporary storage of data. So whenever there is a case of work file required to store the data temporarily, then we will prefer Cache BSFN for better performance. Please find the sample cache bSFN I have created to add, delete, update, fetch all, fetch select based on switch cases. It will be helpful to start on cache. Master BSFN delas with cache+transaction property, I guess. I hope mostly there will be no necessity to create master bsfns. Most of the time we will use standard MBFs.

    Regards
    Sujit R


    Hi Sujit,

    This is very useful information you shared.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
The legal restrictions and terms of use applicable to this site are available here.
Use of this site signifies your agreement to the terms of use.
JDELIST is NOT affiliated with JD Edwards® & Company, Oracle or Peoplesoft. Contents of this site are neither endorsed nor approved by JD Edwards® & Company, Oracle or Peoplesoft.