cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Form Detail (Form Table Name) through Form Type?

Former Member
0 Kudos

Hi Expert,

How to get Form Detail (Form Table Name) through Form Type?

I have Form Types and i want to get Form Details(Form Name and Table name) for same form type.

is there any table in SAP B1 to get All Forms table name or id through Form Types???

for example

133 is A/R Invoice form type.

select * from ???? where FormType= 133;

???? - Which table ???

Please answer ASAP....

Thanks And Regard

Pradeep K.

Accepted Solutions (0)

Answers (4)

Answers (4)

maik_delly
Active Contributor
0 Kudos

Hi Pradeep,

for this scenario I usually use a ( reuseable ) switch condition :


String tableName = "";

switch (formType)

{

    case "149": tableName = "OQUT"; break;//Quotation

    case "139": tableName = "ORDR"; break;//Order

    case "140": tableName = "ODLN"; break;//Delivery

    case "133": tableName = "OINV"; break;//Invoice

    case "180": tableName = "ORDN"; break;//Deliver Note Return

    case "179": tableName = "ORIN"; break; //Invoice Credit Memo

    case "60091": tableName = "OINV"; break; //Invoice

    case "1470000200": tableName = "OPRQ"; break; //Purchase Request

    case "540000988": tableName = "OPQT"; break; //Purchase Quotation

    case "142": tableName = "OPOR"; break;//Purchase Order

    case "143": tableName = "OPDN"; break;//Purchase Delivery Note/Goods Receipt

    case "141": tableName = "OPCH"; break;//Purchase Invoice

    case "181": tableName = "ORPC"; break;//Purchase Invoice Credit Memo

    case "182": tableName = "ORPD"; break;//Goods Return

}

}

Or, if you catch an event  ( ItemEvent in this case ) on a document form:


SAPbouiCOM.Form oForm = SBO_Application.Forms.Item(pVal.FormUID);

String tableName = oForm.DataSources.DBDataSources.Item(0).TableName;

regards,

Maik

Former Member
0 Kudos

Hi,

You may create your own function to translate these object codes to the table name, but you have to store list information in a user table.

Regards, alessandro

Former Member
0 Kudos

Hi. tables names u can not get it.

if u get it also ..

sap b1 tables it will not support u to do something.

like dbdatasoruce method it will not support on system forms...

Former Member
0 Kudos

Hi Pradeep,

Please check this link. may be it will be useful to you and also its shows form type & Object type.

Thanks,

P.T.Sampath

Former Member
0 Kudos

Thanks sampath,

Yes i have already read this document.

i need tabel name which is store all FormType and FormDetails..

Thank You

Pradeep

Former Member
0 Kudos

hi.

i think form type u can not see in table oinv

u have to remember the table name from seeing the system information after than u have to write at sql ...

object type also u can check it in with respective to the table

one object is not same as other object in tables..


select * from ???? where FormType= 133;

select * from  oinv where  from type is wrong.

may be u r thinking all the forms are saving in one table

no.

Diff diff tables..

select * from oinv  u can get the data of sales invoice header only..

no need to write any from type..

If u need any clarification just explain the scenario....

Former Member
0 Kudos

Thank you Shrinivas,

Yes u r right, select * from  oinv where  from type is wrong.

I know, I just gave you one example..

I want table information From Database by using FormType No.

Suppose i have Form Type No is 142, So tell me how to get Details about Form Type 142 FromType.

Thanks and Regard

Pradeep

Former Member
0 Kudos

Still Not understood..

If u dont mind tell what is your requirement.

As per my knowledge From type 133 means invoice like this we have to remember..

why u r asking  can u plz explain what u r doing..

Former Member
0 Kudos

Actualy i have following code.

string FrmID = LDNA_Application.Forms.ActiveForm.Type.ToString();

i want to fetch table or form which is having same FormID or FormType.

Thanks