Skip to main content
Question

Pop-up with additional data for sql block in menu

  • April 10, 2024
  • 1 reply
  • 68 views

Forum|alt.badge.img

Hello,

As a fresh SQL user, I'm having trouble implementing a certain functionality in IFSAPP 10. I'm trying to add a PL/SQL block to the user menu (On customer order lines) that will add a record in a table I've created. Currently, I'm using a simple code that works by adding a record with the appropriate key, but I'm struggling to allow the user to input additional data such as comments or planned date. I've also written a version of the code that requires entering all the data manually. Unfortunately, I can't seem to integrate them. In the reports I've created, I use '&' to allow for manual input of values. While running report user gets pop-up window with required fields. However, this method doesn't seem to work here.

DECLARE
    now_            DATE            := TRUNC(SYSDATE);
--    planned_        DATE            := TRUNC(&Data_wykonania);
    user_id_        VARCHAR2(30)    := NULL;
    note_           VARCHAR2(32000) := '&Additional_Data'; -- Prompt user for additional data
    p0_             VARCHAR2(32000) := NULL;
    p1_             VARCHAR2(32000) := NULL;
    p2_             VARCHAR2(32000) := NULL;
    p3_             VARCHAR2(32000) := NULL;
    p4_             VARCHAR2(32000) := 'DO';

BEGIN
    -- Get user_id
    SELECT ifsapp.FND_SESSION_API.Get_Fnd_User() INTO user_id_ FROM dual;


    IFSAPP.Client_Sys.Add_To_Attr('CF$_ORDER_NO',        &ORDER_NO,      p3_);
    IFSAPP.Client_Sys.Add_To_Attr('CF$_LINE_NO',        &LINE_NO,       p3_);
    IFSAPP.Client_Sys.Add_To_Attr('CF$_REL_NO',            &REL_NO,        p3_);
    IFSAPP.Client_Sys.Add_To_Attr('CF$_LINE_ITEM_NO',    &LINE_ITEM_NO,  p3_);
    IFSAPP.Client_Sys.Add_To_Attr('CF$_CREATED_BY',        user_id_,       p3_);
    IFSAPP.Client_Sys.Add_To_Attr('CF$_DATE_CREATED',    now_,           p3_);
    IFSAPP.Client_Sys.Add_To_Attr('CF$_NOTE',            note_,            p3_);
--    IFSAPP.Client_Sys.Add_To_Attr('CF$_PLANNED_DUE_DATE',planned_,        p3_);

    -- Insert data
    IFSAPP.OPOZNIENIA_POZAPRODUKCYJNE_CLP.NEW__(p0_, p1_, p2_, p3_, p4_);
END;

 

We generally need to track additional delays on orders resulting from tasks performed by external companies on our products. We also want to have them all in one place. In addition to the current issue, I will add a column that will show the latest date delaying the departure of our product on customer order lines for the logistics department.

To summarize, I want the code to gather additional data from user, similar to when testing in the editor and simultaneously, to fetch data from the line with order_no, line_no etc.

Forum|alt.badge.img+14
  • Superhero (Employee)
  • April 11, 2024

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings