cancel
Showing results for 
Search instead for 
Did you mean: 

Logic of Doc Entry in Add Mode

Former Member
0 Kudos

Hi,

I have created a master data and could generate the DocEntry in the Find mode but i dont know how to generate the Doc Entry in the Add mode..

Help me out to know the logic of this.

And, here is my code,

Dim docent As String

        docent = oMain.oUtilities.getMaxCode("@EAHCM_TGM", "DocEntry")

        oMain.oUtilities.setEdittextvalue(oForm, "DocEntry", docent)

        Dim docent1 As String

        docent1 = oMain.oUtilities.getMaxCode("@EAHCM_TGM", "Code")

        oMain.oUtilities.setEdittextvalue(oForm, "Code", docent1)

Regards,

Jananisuba S

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

In Master data, Always open in "Find Mode" whereas Document data, always opened in "Add Mode".

Check in SAP B1-- Business Partner, Item Master like that documents opened in "Find Mode".

Marketing documents (i.e.,) Transaction based documents  opened in "Add Mode".

In your scenario,

Dim docent As String

        docent = oMain.oUtilities.getMaxCode("@EAHCM_TGM", "DocEntry")

        oMain.oUtilities.setEdittextvalue(oForm, "DocEntry", docent)

        Dim docent1 As String

        docent1 = oMain.oUtilities.getMaxCode("@EAHCM_TGM", "Code")

        oMain.oUtilities.setEdittextvalue(oForm, "Code", docent1)

While loading the form, better you change the form mode.

i.e, frm.Mode= SAPbouiCOM.BoFormMode.fm_ADD_MODE '/ docent1

frm.Mode= SAPbouiCOM.BoFormMode.fm_FIND_MODE '/docent

Thanks & Regards,

Bowya S S

Former Member
0 Kudos

Hi,

Why not use the same value for both columns? An extra-benefit would be to avoid a useless query...

Regards,

Eric