Documente Academic
Documente Profesional
Documente Cultură
How to Create Stock Locators Using API By Ahmed Bilal a mian1!"1#gmail$com %or www$erpst&''$com
1$ Create (a le
Create a temporary table using following script CREATE TABLE DEV_DATA ( SR_ ! "#BER$ % V_!R&_%D "#BER$ % VE T!R'_!R&A %(AT%! "#BER$ S"B_% VE T!R' C)AR(* B'TE+$ ,ARE)!"SE C)AR(* B'TE+$ -L!R C)AR(* B'TE+$ R!, C)AR(* B'TE+$ RAC. C)AR(* B'TE+$ B% C)AR(* B'TE+$ B!/ C)AR(* B'TE+$ S"00L%ER C)AR(1 B'TE+$ S0ARE2 C)AR(* B'TE+$ S0ARE3 C)AR(* B'TE+$ C!DE C)AR(14 B'TE+$ CREAT%! _DATE DATE$ STAT"S C)AR(2 B'TE+ +
Select count(8+ from 6e9_6ata Select 8 from 6e9_6ata 'ou can use any ot:er met:o6 to populate t:e temporary table ot:er t:an s7l loa6er;
DBMS_OUTPUT.PUT_LINE(BTrying to create BEEl_concatenate6_segments+= % V_L!C_,#S_0"B;CREATE_L!CAT!R( 5_return_status ?F l_return_status$ 5_msg_count ?F l_msg_count$ 5_msg_6ata ?F l_msg_6ata$ 5_in9entory_location_i6 ?F l_locator_i6$ 5_locator_e5ists ?F l_locator_e5ists$ p_organiAation_i6 ?F l_org_i6$ p_organiAation_co6e ?F l_organiAation_co6e$ p_concatenate6_segments ?F l_concatenate6_segments$ p_6escription ?F BLocator Create6 By A0%B$@8'ou can also use :ere 6escription of 'our Locator Combination8@ p_in9entory_location_type ?F *$ && Stora'e locator p_picGing_or6er ?F "LL$ p_location_ma5imum_units ?F "LL$ p_subin9entory_co6e ?F l_sub_co6e$ @8Subin9entory Co6e 8@ p_location_weig:t_uom_co6e ?F "LL$ p_ma5_weig:t ?F "LL$ p_9olume_uom_co6e ?F "LL$ p_ma5_cubic_area ?F "LL$ p_5_coor6inate ?F "LL$ p_y_coor6inate ?F "LL$ p_A_coor6inate ?F "LL$ p_p:ysical_location_i6 ?F "LL$ p_picG_uom_co6e ?F "LL$ p_6imension_uom_co6e ?F "LL$ p_lengt: ?F "LL$ p_wi6t: ?F "LL$ p_:eig:t ?F "LL$ p_status_i6 ?F 2$ && (efault status )Acti$e) p_6ropping_or6er ?F "LL += DBMS_OUTPUT.PUT_LINE(BReturn Status BEEl_return_status+= %- l_return_status % (BEB$ B"B+ T)E DBMS_OUTPUT.PUT_LINE(BH of Errors BEEl_msg_count+= up6ate 6e9_6ata set status ? l_return_status w:ere sr_no ? 9_loc;sr_no = commit= %- l_msg_count ? 2 T)E DBMS_OUTPUT.PUT_LINE(BError BEEl_msg_6ata+= ELSE -!R i % 2;;l_msg_count L!!0 DBMS_OUTPUT.PUT_LINE(BError BEE- D_#S&_0"B;&ET(i$ B-B++= E D L!!0= E D %-= ELSE DBMS_OUTPUT.PUT_LINE(BLocator %6 is BEEl_locator_i6+= E D %-= /* * No* try to create t#e Pro+ect/Tas, Locator * * p_concatenated_se'-ents s#ould al*ays be t#e $alue t#at you see in t#e des,top for-s * not internal ids * If t#e des,top for- s#o*s )Stor././.Pacific Pu-ps.) && t#e sa-e s#ould be passed to * t#e API
* */ DBMS_OUTPUT.PUT_LINE(BTrying to create BEEl_concatenate6_segments+= % V_L!C_,#S_0"B;CREATE_L!CAT!R( 5_return_status ?F l_return_status$ 5_msg_count ?F l_msg_count$ 5_msg_6ata ?F l_msg_6ata$ 5_in9entory_location_i6 ?F l_locator_i6$ 5_locator_e5ists ?F l_locator_e5ists$ p_organiAation_i6 ?F l_org_i6$ p_organiAation_co6e ?F l_organiAation_co6e$ p_concatenate6_segments ?F l_concatenate6_segments$ p_6escription ?F BLocator Create6 By A0%B$ p_in9entory_location_type ?F *$ && Stora'e locator p_picGing_or6er ?F "LL$ p_location_ma5imum_units ?F "LL$ p_subin9entory_co6e ?F l_sub_co6e$ p_location_weig:t_uom_co6e ?F "LL$ p_ma5_weig:t ?F "LL$ p_9olume_uom_co6e ?F "LL$ p_ma5_cubic_area ?F "LL$ p_5_coor6inate ?F "LL$ p_y_coor6inate ?F "LL$ p_A_coor6inate ?F "LL$ p_p:ysical_location_i6 ?F l_locator_i6$ && 0alue 'ot fro- call abo$e p_picG_uom_co6e ?F "LL$ p_6imension_uom_co6e ?F "LL$ p_lengt: ?F "LL$ p_wi6t: ?F "LL$ p_:eig:t ?F "LL$ p_status_i6 ?F 2$ && (efault status )Acti$e) p_6ropping_or6er ?F "LL += DBMS_OUTPUT.PUT_LINE(BReturn Status BEEl_return_status+= %- l_return_status % (BEB$ B"B+ T)E DBMS_OUTPUT.PUT_LINE(BH of Errors BEEl_msg_count+= up6ate 6e9_6ata set status ? l_return_status w:ere sr_no ? 9_loc;sr_no = commit= %- l_msg_count ? 2 T)E DBMS_OUTPUT.PUT_LINE(BError BEEl_msg_6ata+= ELSE -!R i % 2;;l_msg_count L!!0 DBMS_OUTPUT.PUT_LINE(BError BEE- D_#S&_0"B;&ET(i$ B-B++= E D L!!0= E D %-= ELSE DBMS_OUTPUT.PUT_LINE(BLocator %6 is BEEl_locator_i6+= E D %-= E D L!!0= E D L!!0= CL!SE c_loc= E D=