Vous êtes sur la page 1sur 10

data.Body.Item.Button2::click - (JavaScript, client) if ( MATNR.rawValue == null ) { var msg16 = Lang.Msg16.rawValue; var msg17 = Lang.Msg17.

rawValue; var msg = msg16 + msg17; xfa.host.messageBox(msg); //xfa.host.messageBox("The entered Material cannot be found. Please enter a vali d SAP Material Master number"); xfa.host.setFocus( "MATNR" ); } else if ( MTART.rawValue == null ) { var msg16 = Lang.Msg16.rawValue; var msg17 = Lang.Msg17.rawValue; if ( flag == "X" ) { Table.Table1.Row1.Cell2.rawValue = MATNR.rawValue; Table.Table1.Row1.Cell3.rawValue = ZCTLG.rawValue; Table.Table1.Row1.Cell4.rawValue = ZGRD.rawValue; Table.Table1.Row1.Cell5.rawValue = MATGR.rawValue; Table.Table1.Row1.Cell6.rawValue = PRDHA.rawValue; Table.Table1.Row1.Cell7.rawValue = UOM.rawValue; Table.Table1.Row1.Cell8.rawValue = MSTAV.rawValue; Table.Table1.Row1.Cell9.rawValue = MAABC.rawValue; if (Continuous.rawValue != null) { Table.Table1.Row1.Cell10.rawValue = Continuous.rawValue; } else { Table.Table1.Row1.Cell10.rawValue = OneTime.rawValue; } var b = parseInt(NewDemand.rawValue); Table.Table1.Row1.Cell11.rawValue = b.toString(); var b = parseInt(PrevDemand.rawValue); Table.Table1.Row1.Cell12.rawValue = b.toString(); Table.Table1.Row1.Cell13.rawValue = VBELN.rawValue; Table.Table1.Row1.Cell14.rawValue = BNAME.rawValue; Table.Table1.Row1.Cell15.rawValue = SMTP_ADDR.rawValue; data.Body.Table.Table1.Row1.presence = "visible"; //xfa.form.recalculate(true); } } else if(Table.Table1.Row2.Cell2.rawValue == null) { var flag = "X"; if ( MSTAV.rawValue == "EO" || MSTAV.rawValue == "ES" ) { var msg28 = Lang.Msg28.rawValue; var msg29 = Lang.Msg29.rawValue; var msg = msg28 + msg29; var res = xfa.host.messageBox(msg,"Confirm",2,2); if (res == "4") { //xfa.host.messageBox("yes"); var flag = "X"; } else

{ //xfa.host.messageBox("no"); var flag = " "; } } if ( flag == "X" ) { Table.Table1.Row2.Cell2.rawValue = MATNR.rawValue; Table.Table1.Row2.Cell3.rawValue = ZCTLG.rawValue; Table.Table1.Row2.Cell4.rawValue = ZGRD.rawValue; Table.Table1.Row2.Cell5.rawValue = MATGR.rawValue; Table.Table1.Row2.Cell6.rawValue = PRDHA.rawValue; Table.Table1.Row2.Cell7.rawValue = UOM.rawValue; Table.Table1.Row2.Cell8.rawValue = MSTAV.rawValue; Table.Table1.Row2.Cell9.rawValue = MAABC.rawValue; if (Continuous.rawValue != null) { Table.Table1.Row2.Cell10.rawValue = Continuous.rawValue; } else { Table.Table1.Row2.Cell10.rawValue = OneTime.rawValue; } //Table.Table1.Row2.Cell10.rawValue = DemandIndicator.rawValue; var c = parseInt(NewDemand.rawValue); Table.Table1.Row2.Cell11.rawValue = c.toString(); var c = parseInt(PrevDemand.rawValue); Table.Table1.Row2.Cell12.rawValue = c.toString(); Table.Table1.Row2.Cell13.rawValue = VBELN.rawValue; Table.Table1.Row2.Cell14.rawValue = BNAME.rawValue; Table.Table1.Row2.Cell15.rawValue = SMTP_ADDR.rawValue; Table.Table1.Row2.presence = "visible"; //xfa.form.recalculate(true); } }// close of flag = "X" of 2nd row data else if(Table.Table1.Row3.Cell3.rawValue == null) { var flag = "X"; if ( MSTAV.rawValue == "EO" || MSTAV.rawValue == "ES" ) { var msg28 = Lang.Msg28.rawValue; var msg29 = Lang.Msg29.rawValue; var msg = msg28 + msg29; var res = xfa.host.messageBox(msg,"Confirm",2,2); if (res == "4") { //xfa.host.messageBox("yes"); var flag = "X"; } else { //xfa.host.messageBox("no"); var flag = " "; } } if ( flag == "X" ) { Table.Table1.Row3.Cell2.rawValue = MATNR.rawValue; Table.Table1.Row3.Cell3.rawValue = ZCTLG.rawValue; Table.Table1.Row3.Cell4.rawValue = ZGRD.rawValue;

Table.Table1.Row3.Cell5.rawValue = MATGR.rawValue; Table.Table1.Row3.Cell6.rawValue = PRDHA.rawValue; Table.Table1.Row3.Cell7.rawValue = UOM.rawValue; Table.Table1.Row3.Cell8.rawValue = MSTAV.rawValue; Table.Table1.Row3.Cell9.rawValue = MAABC.rawValue; if (Continuous.rawValue != null) { Table.Table1.Row3.Cell10.rawValue = Continuous.rawValue; } else { Table.Table1.Row3.Cell10.rawValue = OneTime.rawValue; } //Table.Table1.Row3.Cell10.rawValue = DemandIndicator.rawValue; var b = parseInt(NewDemand.rawValue); Table.Table1.Row3.Cell11.rawValue = b.toString(); var b = parseInt(PrevDemand.rawValue); Table.Table1.Row3.Cell12.rawValue = b.toString(); Table.Table1.Row3.Cell13.rawValue = VBELN.rawValue; Table.Table1.Row3.Cell14.rawValue = BNAME.rawValue; Table.Table1.Row3.Cell15.rawValue = SMTP_ADDR.rawValue; Table.Table1.Row3.presence = "visible"; } }// End of flag braces else if(Table.Table1.Row4.Cell2.rawValue == null) { var flag = "X"; if ( MSTAV.rawValue == "EO" || MSTAV.rawValue == "ES" ) { var msg28 = Lang.Msg28.rawValue; var msg29 = Lang.Msg29.rawValue; var msg = msg28 + msg29; var res = xfa.host.messageBox(msg,"Confirm",2,2); if (res == "4") { //xfa.host.messageBox("yes"); var flag = "X"; } else { //xfa.host.messageBox("no"); var flag = " "; } } if ( flag == "X" ) { Table.Table1.Row4.Cell2.rawValue = MATNR.rawValue; Table.Table1.Row4.Cell3.rawValue = ZCTLG.rawValue; Table.Table1.Row4.Cell4.rawValue = ZGRD.rawValue; Table.Table1.Row4.Cell5.rawValue = MATGR.rawValue; Table.Table1.Row4.Cell6.rawValue = PRDHA.rawValue; Table.Table1.Row4.Cell7.rawValue = UOM.rawValue; Table.Table1.Row4.Cell8.rawValue = MSTAV.rawValue; Table.Table1.Row4.Cell9.rawValue = MAABC.rawValue; //Table.Table1.Row4.Cell10.rawValue = DemandIndicator.rawValue; if (Continuous.rawValue != null) { Table.Table1.Row4.Cell10.rawValue = Continuous.rawValue; } else

{ Table.Table1.Row4.Cell10.rawValue = OneTime.rawValue; } var b = parseInt(NewDemand.rawValue); Table.Table1.Row4.Cell11.rawValue = b.toString(); var b = parseInt(PrevDemand.rawValue); Table.Table1.Row4.Cell12.rawValue = b.toString(); Table.Table1.Row4.Cell13.rawValue = VBELN.rawValue; Table.Table1.Row4.Cell14.rawValue = BNAME.rawValue; Table.Table1.Row4.Cell15.rawValue = SMTP_ADDR.rawValue; Table.Table1.Row4.presence = "visible"; } } // end of flag braces else if(Table.Table1.Row5.Cell2.rawValue == null) { var flag = "X"; if ( MSTAV.rawValue == "EO" || MSTAV.rawValue == "ES" ) { var msg28 = Lang.Msg28.rawValue; var msg29 = Lang.Msg29.rawValue; var msg = msg28 + msg29; var res = xfa.host.messageBox(msg,"Confirm",2,2); if (res == "4") { //xfa.host.messageBox("yes"); var flag = "X"; } else { //xfa.host.messageBox("no"); var flag = " "; } } if ( flag == "X" ) { Table.Table1.Row5.Cell2.rawValue = MATNR.rawValue; Table.Table1.Row5.Cell3.rawValue = ZCTLG.rawValue; Table.Table1.Row5.Cell4.rawValue = ZGRD.rawValue; Table.Table1.Row5.Cell5.rawValue = MATGR.rawValue; Table.Table1.Row5.Cell6.rawValue = PRDHA.rawValue; Table.Table1.Row5.Cell7.rawValue = UOM.rawValue; Table.Table1.Row5.Cell8.rawValue = MSTAV.rawValue; Table.Table1.Row5.Cell9.rawValue = MAABC.rawValue; //Table.Table1.Row5.Cell10.rawValue = DemandIndicator.rawValue; if (Continuous.rawValue != null) { Table.Table1.Row5.Cell10.rawValue = Continuous.rawValue; } else { Table.Table1.Row5.Cell10.rawValue = OneTime.rawValue; } var b = parseInt(NewDemand.rawValue); Table.Table1.Row5.Cell11.rawValue = b.toString(); var b = parseInt(PrevDemand.rawValue); Table.Table1.Row5.Cell12.rawValue = b.toString(); Table.Table1.Row5.Cell13.rawValue = VBELN.rawValue; Table.Table1.Row5.Cell14.rawValue = BNAME.rawValue; Table.Table1.Row5.Cell15.rawValue = SMTP_ADDR.rawValue; Table.Table1.Row5.presence = "visible";

} } // end of flag braces else if(Table.Table1.Row6.Cell2.rawValue == null) { var flag = "X"; if ( MSTAV.rawValue == "EO" || MSTAV.rawValue == "ES" ) { var msg28 = Lang.Msg28.rawValue; var msg29 = Lang.Msg29.rawValue; var msg = msg28 + msg29; var res = xfa.host.messageBox(msg,"Confirm",2,2); if (res == "4") { //xfa.host.messageBox("yes"); var flag = "X"; } else { //xfa.host.messageBox("no"); var flag = " "; } } if ( flag == "X" ) { Table.Table1.Row6.Cell2.rawValue = MATNR.rawValue; Table.Table1.Row6.Cell3.rawValue = ZCTLG.rawValue; Table.Table1.Row6.Cell4.rawValue = ZGRD.rawValue; Table.Table1.Row6.Cell5.rawValue = MATGR.rawValue; Table.Table1.Row6.Cell6.rawValue = PRDHA.rawValue; Table.Table1.Row6.Cell7.rawValue = UOM.rawValue; Table.Table1.Row6.Cell8.rawValue = MSTAV.rawValue; Table.Table1.Row6.Cell9.rawValue = MAABC.rawValue; if (Continuous.rawValue != null) { Table.Table1.Row6.Cell10.rawValue = Continuous.rawValue; } else { Table.Table1.Row6.Cell10.rawValue = OneTime.rawValue; } //Table.Table1.Row6.Cell10.rawValue = DemandIndicator.rawValue; var b = parseInt(NewDemand.rawValue); Table.Table1.Row6.Cell11.rawValue = b.toString(); var b = parseInt(PrevDemand.rawValue); Table.Table1.Row6.Cell12.rawValue = b.toString(); Table.Table1.Row6.Cell13.rawValue = VBELN.rawValue; Table.Table1.Row6.Cell14.rawValue = BNAME.rawValue; Table.Table1.Row6.Cell15.rawValue = SMTP_ADDR.rawValue; Table.Table1.Row6.presence = "visible"; } } // end of flag braces else if(Table.Table1.Row7.Cell2.rawValue == null) { var flag = "X"; if ( MSTAV.rawValue == "EO" || MSTAV.rawValue == "ES" ) { var msg28 = Lang.Msg28.rawValue; var msg29 = Lang.Msg29.rawValue; var msg = msg28 + msg29; var res = xfa.host.messageBox(msg,"Confirm",2,2);

if (res == "4") { //xfa.host.messageBox("yes"); var flag = "X"; } else { //xfa.host.messageBox("no"); var flag = " "; } } if ( flag == "X" ) { Table.Table1.Row7.Cell2.rawValue = MATNR.rawValue; Table.Table1.Row7.Cell3.rawValue = ZCTLG.rawValue; Table.Table1.Row7.Cell4.rawValue = ZGRD.rawValue; Table.Table1.Row7.Cell5.rawValue = MATGR.rawValue; Table.Table1.Row7.Cell6.rawValue = PRDHA.rawValue; Table.Table1.Row7.Cell7.rawValue = UOM.rawValue; Table.Table1.Row7.Cell8.rawValue = MSTAV.rawValue; Table.Table1.Row7.Cell9.rawValue = MAABC.rawValue; if (Continuous.rawValue != null) { Table.Table1.Row7.Cell10.rawValue = Continuous.rawValue; } else { Table.Table1.Row7.Cell10.rawValue = OneTime.rawValue; } //Table.Table1.Row7.Cell10.rawValue = DemandIndicator.rawValue; var b = parseInt(NewDemand.rawValue); Table.Table1.Row7.Cell11.rawValue = b.toString(); var b = parseInt(PrevDemand.rawValue); Table.Table1.Row7.Cell12.rawValue = b.toString(); Table.Table1.Row7.Cell13.rawValue = VBELN.rawValue; Table.Table1.Row7.Cell14.rawValue = BNAME.rawValue; Table.Table1.Row7.Cell15.rawValue = SMTP_ADDR.rawValue; Table.Table1.Row7.presence = "visible"; } } // end of flag braces else if(Table.Table1.Row8.Cell2.rawValue == null) { var flag = "X"; if ( MSTAV.rawValue == "EO" || MSTAV.rawValue == "ES" ) { var msg28 = Lang.Msg28.rawValue; var msg29 = Lang.Msg29.rawValue; var msg = msg28 + msg29; var res = xfa.host.messageBox(msg,"Confirm",2,2); if (res == "4") { //xfa.host.messageBox("yes"); var flag = "X"; } else { //xfa.host.messageBox("no"); var flag = " "; } }

if ( flag == "X" ) { Table.Table1.Row8.Cell2.rawValue = MATNR.rawValue; Table.Table1.Row8.Cell3.rawValue = ZCTLG.rawValue; Table.Table1.Row8.Cell4.rawValue = ZGRD.rawValue; Table.Table1.Row8.Cell5.rawValue = MATGR.rawValue; Table.Table1.Row8.Cell6.rawValue = PRDHA.rawValue; Table.Table1.Row8.Cell7.rawValue = UOM.rawValue; Table.Table1.Row8.Cell8.rawValue = MSTAV.rawValue; Table.Table1.Row8.Cell9.rawValue = MAABC.rawValue; if (Continuous.rawValue != null) { Table.Table1.Row8.Cell10.rawValue = Continuous.rawValue; } else { Table.Table1.Row8.Cell10.rawValue = OneTime.rawValue; } //Table.Table1.Row8.Cell10.rawValue = DemandIndicator.rawValue; var b = parseInt(NewDemand.rawValue); Table.Table1.Row8.Cell11.rawValue = b.toString(); var b = parseInt(PrevDemand.rawValue); Table.Table1.Row8.Cell12.rawValue = b.toString(); Table.Table1.Row8.Cell13.rawValue = VBELN.rawValue; Table.Table1.Row8.Cell14.rawValue = BNAME.rawValue; Table.Table1.Row8.Cell15.rawValue = SMTP_ADDR.rawValue; Table.Table1.Row8.presence = "visible"; } } // end of flag braces else if(Table.Table1.Row9.Cell2.rawValue == null) { var flag = "X"; if ( MSTAV.rawValue == "EO" || MSTAV.rawValue == "ES" ) { var msg28 = Lang.Msg28.rawValue; var msg29 = Lang.Msg29.rawValue; var msg = msg28 + msg29; var res = xfa.host.messageBox(msg,"Confirm",2,2); if (res == "4") { //xfa.host.messageBox("yes"); var flag = "X"; } else { //xfa.host.messageBox("no"); var flag = " "; } } if ( flag == "X" ) { Table.Table1.Row9.Cell2.rawValue = MATNR.rawValue; Table.Table1.Row9.Cell3.rawValue = ZCTLG.rawValue; Table.Table1.Row9.Cell4.rawValue = ZGRD.rawValue; Table.Table1.Row9.Cell5.rawValue = MATGR.rawValue; Table.Table1.Row9.Cell6.rawValue = PRDHA.rawValue; Table.Table1.Row9.Cell7.rawValue = UOM.rawValue; Table.Table1.Row9.Cell8.rawValue = MSTAV.rawValue; Table.Table1.Row9.Cell9.rawValue = MAABC.rawValue; if (Continuous.rawValue != null)

{ Table.Table1.Row9.Cell10.rawValue = Continuous.rawValue; } else { Table.Table1.Row9.Cell10.rawValue = OneTime.rawValue; } //Table.Table1.Row9.Cell10.rawValue = DemandIndicator.rawValue; var b = parseInt(NewDemand.rawValue); Table.Table1.Row9.Cell11.rawValue = b.toString(); var b = parseInt(PrevDemand.rawValue); Table.Table1.Row9.Cell12.rawValue = b.toString(); Table.Table1.Row9.Cell13.rawValue = VBELN.rawValue; Table.Table1.Row9.Cell14.rawValue = BNAME.rawValue; Table.Table1.Row9.Cell15.rawValue = SMTP_ADDR.rawValue; Table.Table1.Row9.presence = "visible"; } } // end of flag braces else if(Table.Table1.Row10.Cell2.rawValue == null) { var flag = "X"; if ( MSTAV.rawValue == "EO" || MSTAV.rawValue == "ES" ) { var msg28 = Lang.Msg28.rawValue; var msg29 = Lang.Msg29.rawValue; var msg = msg28 + msg29; var res = xfa.host.messageBox(msg,"Confirm",2,2); if (res == "4") { //xfa.host.messageBox("yes"); var flag = "X"; } else { //xfa.host.messageBox("no"); var flag = " "; } } if ( flag == "X" ) { Table.Table1.Row10.Cell2.rawValue = MATNR.rawValue; Table.Table1.Row10.Cell3.rawValue = ZCTLG.rawValue; Table.Table1.Row10.Cell4.rawValue = ZGRD.rawValue; Table.Table1.Row10.Cell5.rawValue = MATGR.rawValue; Table.Table1.Row10.Cell6.rawValue = PRDHA.rawValue; Table.Table1.Row10.Cell7.rawValue = UOM.rawValue; Table.Table1.Row10.Cell8.rawValue = MSTAV.rawValue; Table.Table1.Row10.Cell9.rawValue = MAABC.rawValue; //Table.Table1.Row10.Cell10.rawValue = DemandIndicator.rawValue; if (Continuous.rawValue != null) { Table.Table1.Row10.Cell10.rawValue = Continuous.rawValue; } else { Table.Table1.Row10.Cell10.rawValue = OneTime.rawValue; } var b = parseInt(NewDemand.rawValue); Table.Table1.Row10.Cell11.rawValue = b.toString(); var b = parseInt(PrevDemand.rawValue);

Table.Table1.Row10.Cell12.rawValue = b.toString(); Table.Table1.Row10.Cell13.rawValue = VBELN.rawValue; Table.Table1.Row10.Cell14.rawValue = BNAME.rawValue; Table.Table1.Row10.Cell15.rawValue = SMTP_ADDR.rawValue; Table.Table1.Row10.presence = "visible"; } } // end of flag braces else { var msg19 = Lang.Msg19.rawValue; var msg20 = Lang.Msg20.rawValue; var msg = msg19 + msg20; xfa.host.messageBox(msg); //xfa.host.messageBox("You have reached the maximum items allowed in a SIPPPR. P lease start a new SIPPPR"); } MATNR.rawValue = null; NewDemand.rawValue = null; PrevDemand.rawValue = null; VBELN.rawValue = null; ZCTLG.rawValue = null; ZGRD.rawValue = null; MATGR.rawValue = null; PRDHA.rawValue = null; MTART.rawValue = null; MSTAV.rawValue = null; MAABC.rawValue = null; RowCount.value = "0"; if (Table.Table1.Row1.Cell2.rawValue != null) { var a = parseInt(RowCount.value) + 1 ; RowCount.value = a.toString(); Table.Table1.Row1.Cell1.rawValue = RowCount.value; } if (Table.Table1.Row2.Cell2.rawValue != null) { var a = parseInt(RowCount.value) + 1 ; RowCount.value = a.toString(); Table.Table1.Row2.Cell1.rawValue = RowCount.value; } if (Table.Table1.Row3.Cell2.rawValue != null) { var a = parseInt(RowCount.value) + 1 ; RowCount.value = a.toString(); Table.Table1.Row3.Cell1.rawValue = RowCount.value; } if (Table.Table1.Row4.Cell2.rawValue != null) { var a = parseInt(RowCount.value) + 1 ; RowCount.value = a.toString(); Table.Table1.Row4.Cell1.rawValue = RowCount.value; } if (Table.Table1.Row5.Cell2.rawValue != null) { var a = parseInt(RowCount.value) + 1 ; RowCount.value = a.toString(); Table.Table1.Row5.Cell1.rawValue = RowCount.value; } if (Table.Table1.Row6.Cell2.rawValue != null) {

var a = parseInt(RowCount.value) + 1 ; RowCount.value = a.toString(); Table.Table1.Row6.Cell1.rawValue = RowCount.value; } if (Table.Table1.Row7.Cell2.rawValue != null) { var a = parseInt(RowCount.value) + 1 ; RowCount.value = a.toString(); Table.Table1.Row7.Cell1.rawValue = RowCount.value; } if (Table.Table1.Row8.Cell2.rawValue != null) { var a = parseInt(RowCount.value) + 1 ; RowCount.value = a.toString(); Table.Table1.Row8.Cell1.rawValue = RowCount.value; } if (Table.Table1.Row9.Cell2.rawValue != null) { var a = parseInt(RowCount.value) + 1 ; RowCount.value = a.toString(); Table.Table1.Row9.Cell1.rawValue = RowCount.value; } if (Table.Table1.Row10.Cell2.rawValue != null) { var a = parseInt(RowCount.value) + 1 ; RowCount.value = a.toString(); Table.Table1.Row10.Cell1.rawValue = RowCount.value; } }

data.Body.Item.Button2::ready:layout - (JavaScript, client) if ( Header.SIPPPRID.rawValue == null ) { Item.Button2.access = "open"; } else { Item.Button2.access = "readOnly"; }