Automate

 View Only
  • 1.  Winshuttle pour la comptabilisation de piéces par FB01

    Posted 27 days ago

    Bonjour la communauté,

    J'ai une petite question, je travaille sur un script qui comptabilise des pièces comptables en utilisant la transaction FB01.

    Il s'agit d'une boucle car le demandeur a besoin de compter plusieurs postes, un est un débit pour une écriture client et le restes sont des crédits (l'un avec TVA calculé avec un code TVA et l'autre sans TVA) , du coup dans mon scénario j'ai essayé de mettre 6 postes:

    Dans mon script j'ai considéré une boucle qui commence à partir du 2éme poste puis cliquer sur le bouton poste suivant jusqu'à 3éme poste

     Le 1er CC= 09.. et puis cliquer sur bouton OK et puis le montant (là j'ai commencé ma boucle) jusqu'au 3éme poste et puis désactivé le reste.

    En arrivant à l'exécution le script ne marche pas. qui peux m'expliquer pk?

    Sinon je peux considéré une boucle (qui commence à partir du détail de 1er poste et qui s'arrête au 2éme poste)?



    ------------------------------
    Meryam KHOUBBAZ
    Knowledge Community Shared Account
    NJ
    ------------------------------


  • 2.  RE: Winshuttle pour la comptabilisation de piéces par FB01

    Posted 26 days ago

    Bonjour Meryam,

    Pourque tout le monde puisse suivre, je continue en Anglais:

    I'm not familiar with this T-code, but I 'm convinced that you're always better off using Direct if you have the choice.

    So a quick look into BAPI's resulted in: BAPI_ACC_GL_POSTING_POST

    you may want to give that a try

    hth, jan



    ------------------------------
    jan ketele
    release expert
    Xeikon Manufacturing NV
    ------------------------------



  • 3.  RE: Winshuttle pour la comptabilisation de piéces par FB01

    Employee
    Posted 23 days ago

    Bonjour Maryam,

    My French is bad, so I will reply in English.

    There is an example template here:  https://community.precisely.com/viewdocument/post-document-1?CommunityKey=e1f0c200-ca7e-46e7-b5c7-01855e5120c7&tab=librarydocuments    You must join the SAP Module Templates community to view it.

    As Jan suggests, the BAPI or even FB50 are easier than FB01, because the fields change on the details of each line item depending on the type of account.  

    I hope the example helps.

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------



  • 4.  RE: Winshuttle pour la comptabilisation de piéces par FB01

    Posted 13 days ago
      |   view attached

    Hello Sigrid,

    First of all, thank you all for you quick response and for your help, i will try to answer you on english even if it is not verry well :p 

    Actually why we cannot use FB50 instead of FB01, is because the first tcode is verry limited. We can only enter general account documents and not other type of account like auxiliary customer, supplier or material ... i uploaded the current obtained script that actually does not worked even with plenty of attemp. ANY HELP PLEASE!?



    ------------------------------
    Meryam KHOUBBAZ
    Asian Infrastructure Investment Bank
    NJ
    ------------------------------

    Attachment(s)

    Txr
    FB01_20240415_Template.Txr   474 KB 1 version


  • 5.  RE: Winshuttle pour la comptabilisation de piéces par FB01

    Employee
    Posted 9 days ago

    Hi Meryam,

    Thanks for sharing your script.  I took a quick look, and there are some things to change/fix:

    1. the SAVE (ok code = BU) should be outside of the  loop
    2. you hit enter after entering the header information, but you didn't give it a line item or go into FAST ENTRY on the top menu - it's lost from then o

    Please see the step by step guide here:  https://help.precisely.com/r/Automate-Studio/20.3/en-US/Automate-Studio-with-Connect-User-Guide/Transaction-Module-Guides/FB01-step-by-step_-Posting-documents

    It's best to enter the header information, go into fast entry and then fill in details.  Make sure you record one of each type of entry - as some have more costing/copa fields than others so that you can capture as many of the fields as possible.  Then Save outside of the loop.

    And also an example that uses this approach here with Transaction for FB01:  https://community.precisely.com/viewdocument/post-document-1?CommunityKey=e1f0c200-ca7e-46e7-b5c7-01855e5120c7&tab=librarydocuments 

    The only other thing is that sometimes you will have fields in the detail view and sometimes you will not based on the GL account type.  You may have to use IF statements, for example:  IF Column G (GL account) begins with 6 or Column G begins with 5 THEN include the input fields.  Only you will know what fields exist.

    Also, FB50 does allow you to enter all of the detail fields.  If you go into details on a line item and then click on Profit Segment (for the COPA fields), you will see many:

    Lastly if you want to take the interface out of the equation, you can use a BAPI, like this:  https://community.precisely.com/viewdocument/bapi-acc-document-post-1?CommunityKey=e1f0c200-ca7e-46e7-b5c7-01855e5120c7&tab=librarydocuments 

    It includes a set of COPA fields, and you can copy and paste that section in Expert mode to add/remove them, but you have to know the technical field names.

    I hope this gives you a set of ideas that will give you a choice on what will work best for you.

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------