Skip to main content

Hello,

I want to learn how to “Extract Data” processes works.

For example when i try peg to part lines from “Available Source Lines” to “Part Lines” at “Incoming Dispatch Advice” screen, i see two different ways for extract data on debug.

  • The first one from i_hWndFrame.tbwDispatchAdviceAvailableSourceLines.colsSourceRef1etc (source by receipt_info i think).
  • The second one from i_hWndParent.frmIncomingDispatchAdvice.dfnMessageId etc (source by ext_dispatch_advice i think).

In this case i have no message_id and delnote_no parameters at RECEIPT_INFO_ALT view but those are requirement for parameters of the peg procedure. So need to extract that parameters from the screen, how can i do that?

You can check the pictures. I need to just a way for pegging from RECEIPT_INFO_ALT on SQL somehow (Normally p0_ and p1_ are null at RECEIPT_INFO_ALT view, but if i extract from screen or forms like debug i can peg easily).

Best Regards.

A SAMPLE BEFORE THE PEGGING
-- Context: tbwDispatchAdviceAvailableSourceLines
-- Module: Ifs.Application.Rceipt_.dll
-- Namespace: Ifs.Application.Rceipt_
-- Object: tbwDispatchAdviceAvailableSourceLines
-- Method: menuConnect_Part_Lines_Execute

DECLARE
   -- p0 -> i_hWndParent.frmIncomingDispatchAdvice.dfnMessageId
   p0_ FLOAT := 442;

   -- p1 -> i_hWndParent.frmIncomingDispatchAdvice.dfsDelnoteNo
   p1_ VARCHAR2(32000) := 'OGUZZZZ';

   -- p2 -> i_hWndFrame.tbwDispatchAdviceAvailableSourceLines.colsSourceRef1
   p2_ VARCHAR2(32000) := 'Q20003';

   -- p3 -> i_hWndFrame.tbwDispatchAdviceAvailableSourceLines.colsSourceRef2
   p3_ VARCHAR2(32000) := '1';

   -- p4 -> i_hWndFrame.tbwDispatchAdviceAvailableSourceLines.colsSourceRef3
   p4_ VARCHAR2(32000) := '2';

   -- p5 -> i_hWndFrame.tbwDispatchAdviceAvailableSourceLines.colsSourceRef4
   p5_ VARCHAR2(32000) := '';

   -- p6 -> i_hWndFrame.tbwDispatchAdviceAvailableSourceLines.colsSourceRefTypeDb
   p6_ VARCHAR2(32000) := 'PURCHASE_ORDER';

   -- p7 -> i_hWndFrame.tbwDispatchAdviceAvailableSourceLines.colsPartNo
   p7_ VARCHAR2(32000) := 'H 12 REC 0001';

   -- p8 -> i_hWndFrame.tbwDispatchAdviceAvailableSourceLines.colnSourceQtyToReceive
   p8_ FLOAT := 250;

BEGIN
    IFSAPP.Log_SYS.Init_Debug_Session_('en');
    
IFSAPP.Ext_Dispatch_Advice_Line_API.Add_Part_Lines__(p0_ , p1_ , p2_ , p3_ , p4_ , p5_ , p6_ , p7_ , p8_ );

END;


 

Hi @0guz ,

 

i_hWndFrame and  i_hWndParent are window handles (placeholders) for currently active window and it’s parent in IFS EE. Values of the fields can be directly bind to a view or could be based on calculation in client.

Accessing the client values in the custom menu’s is a well hidden secret in IFS, but it’s so simple to use. Debug console provides all required information and seems you have got everything you need.

All you have to do is to place a colon (:) in front of the field reference to use it in a PLSQL type custom menu :sunglasses:

Example code:

BEGIN
Error_Sys.Appl_General('TestLU',
'Value of Message ID :P1, Value of Sourceref1 :P2' ,
:i_hWndParent.frmIncomingDispatchAdvice.dfnMessageId,
:i_hWndFrame.tbwDispatchAdviceAvailableSourceLines.colsSourceRef1);
END;

 

Result:

 

Hope this is what you were looking for.

Cheers!


Hi @dsj Its really seminal information for me. Thank you so much.

So, next step; is it possible to use this way for what i want to see values on select block?

For example can we show message_id with this approach when we using only receipt_info_alt view (ofc as not null like standart 😁)

Best regards.


Hi @dsj Its really seminal information for me. Thank you so much.

So, next step; is it possible to use this way for what i want to see values on select block?

For example can we show message_id with this approach when we using only receipt_info_alt view (ofc as not null like standart 😁)

Best regards.

Hi @0guz ,

 

This approach is fetching value from the client and it’s not bounded to the view .Therefore you can use it inside the PLSQL block.

Eg:

p0_ FLOAT := :i_hWndParent.frmIncomingDispatchAdvice.dfnMessageId;

 

Hope it answered your question ;)

 

Cheers!

Damith

 


Hi @dsj  thanks for info. The last question is;

Can i use :i_hWndParent.frmIncomingDispatchAdvice.dfnMessageId this sentence as a parameter in the Ext_Dispatch_Advice_Line_API.Add_Part_Lines__ procedure like below;

BEGIN
for rec_ in (select *
from RECEIPT_INFO_ALT x
where x.message_id = '445'
and x.delnote_no = 'OGUZ1') loop

IFSAPP.Ext_Dispatch_Advice_Line_API.Add_Part_Lines__(
:i_hWndParent.frmIncomingDispatchAdvice.dfnMessageId,
:i_hWndParent.frmIncomingDispatchAdvice.dfsDelnoteNo,
rec_.source_ref1,
rec_.source_ref2,
rec_.source_ref3,
rec_.source_ref4,
rec_.source_ref_type_db,
rec_.part_no,
rec_.source_qty_to_receive);
end loop;

END;

Or i have to assign a valuable first to parent and frame sentences?

Best Regards.


Hi @dsj  thanks for info. The last question is;

Can i use :i_hWndParent.frmIncomingDispatchAdvice.dfnMessageId this sentence as a parameter in the Ext_Dispatch_Advice_Line_API.Add_Part_Lines__ procedure like below;

BEGIN
for rec_ in (select *
from RECEIPT_INFO_ALT x
where x.message_id = '445'
and x.delnote_no = 'OGUZ1') loop

IFSAPP.Ext_Dispatch_Advice_Line_API.Add_Part_Lines__(
:i_hWndParent.frmIncomingDispatchAdvice.dfnMessageId,
:i_hWndParent.frmIncomingDispatchAdvice.dfsDelnoteNo,
rec_.source_ref1,
rec_.source_ref2,
rec_.source_ref3,
rec_.source_ref4,
rec_.source_ref_type_db,
rec_.part_no,
rec_.source_qty_to_receive);
end loop;

END;

Or i have to assign a valuable first to parent and frame sentences?

Best Regards.

 

Here’s the method signature of Ext_Dispatch_Advice_Line_API.Add_Part_Lines__.

message_id and delnote_no both are IN type parameters. Therefore you can assign the value as you already did.

If it’s an IN OUT type, then you should assign to a variable first and then use in the method call :)


Reply