on 09-19-2014 8:29 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.