Skip to Content
avatar image
Former Member

[c#] Lack of cfl in sap form while overwriting Choose From List event

What I am doing is trying to override Choose From List on the form Draft Purchase Blanket Agreement.

The problem I am getting is that the choose from list item is not present in this form.

I have withdraw all xml definition of form (I inserted some ... instead long code which is not related to the column, neither cfl etc):

<?xml version="1.0" encoding="UTF-16" ?>
  <action type="add">

  <form appformnumber="1250000102" FormType="1250000102" type="0" 
BorderStyle="0" uid="F_116" title="Draft Purchase Blanket Agreement" 
visible="1" default_button="1250000001" pane="2" color="0" left="322" 
top="31" width="557" height="392" client_width="541" client_height="353"
 AutoManaged="1" SupportedModes="15" ObjectType="1250000025" 
  <action type="add">
  <datasource tablename="ATC1"/>
  <action type="add">
  <action type="add">

  <item uid="1250000045" type="127" left="8" tab_order="240" 
width="524" top="156" height="165" visible="1" enabled="1" from_pane="2"
 to_pane="2" disp_desc="0" right_just="0" description="" linkto="" 
forecolor="-1" backcolor="-1" text_style="0" font_size="-1" 
supp_zeros="0" AffectsFormMode="1">
  <Attribute id="2" description="editable" modeOk="1" modeFind="0"/>
  <specific layout="0" titleHeight="20" cellHeight="16" TabOrder="240">
  <action type="add">

  <column uid="1250000001" type="116" title="Item No." description=""
 visible="1" AffectsFormMode="1" width="85" disp_desc="0" editable="1" 
right_just="0" val_on="" val_off="" backcolor="-1" forecolor="-1" 
text_style="0" font_size="-1" sortable="1" ChooseFromListUID="6" 
  <databind databound="1" table="OAT1" alias="ItemCode"/>
  <ExtendedObject linkedObject="4" LinkedObjectType="4"/>
  <action type="add">
  <ChooseFromList UniqueID="-1" ObjectType="1250000025" MultiSelection="0" IsSystem="1"/>
  <DataBrowser BrowseBy="1250000004"/>

As you can observe the column is using Choose From List of the uid = "6" which is working in SAP. But same time ChooseFromListCollection is empty, or at least doesn't have a Choose From List of uid = "6".

What I am trying to do is assign clicked Choose From List to item like this (C#):

var item = cfls.Item(itemEvent.CFL_Event.ChooseFromListUID);

itemEvent.CFL_Event.ChooseFromListUID is the ChooseFromListUID from interface IChooseFromListEvent from SAPbouiCOM.

At the moment of assign it contains "6" looking ok, but as xml shows there is no cfl like this what finish in error.

Anyone had such a problem ? Anyone can give me a hint how I can fix it ?

If you need more info please ask, and I would be happy to fill the lacking information.

Regards and have a productive day !

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers