如何将值插入功能表

2020-09-24 05:58发布

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


你好;

我的功能在这里;

创建函数" HS_getMaasHesapla"(EmpId INT,MaasTuru VARCHAR(1),Donem VARCHAR(50),SablonCode VARCHAR(50),
        Maas DECIMAL(18,6),Brut DECIMAL(18,6),Pek DECIMAL(18,6),NetEkKazanc DECIMAL(18,6),BrutEkKazanc DECIMAL(18,6),
        EkKesinti DECIMAL(18,6),DvrGvMatrah DECIMAL(18,6),SonBrutMaas DECIMAL(18,6),HesaplananMatrah DECIMAL(18,6),
        IzinTutar DECIMAL(18,6),MesaiTutar DECIMAL(18,6),Agi DECIMAL(18,6),IsBes VARCHAR(1),IsIcra VARCHAR(1),
        登巴西(Donmbasi DATE)


 退货表
 (
     EmpId INT,GVMatrah DECIMAL(18,6),Brut DECIMAL(18,6),SGKIsv DECIMAL(18,6),IszCal DECIMAL(18,6),
     IszIsv DECIMAL(18,6),SGKCal十进制(18,6),GV十进制(18,6),DV十进制(18,6),净十进制(18,6),
     EkKazanc十进制(18,6),Pek十进制(18,6),IzinTutar十进制(18,6),Bes十进制(18,6),Icra十进制(18,6),
     Odenen十进制(18,6),Maliyet十进制(18,6),EkKesinti十进制(18,6),Mesai十进制(18,6)
     ,IcraOran十进制(18,6),DosyaNumarasi varchar(50)
 )
 语言SQLSCRIPT
 SQL安全定义器
 开始
 DV:=" HS_DVTutar"(:Brut,:donembasi,:donemsonu);
 IF(:MaasTuru ='B')THEN Net:=(:Brut)-:SGKCal-:IszCal-:GV-:DV;
 EkKazanc:=:BrutEkKazanc;
 Pek:=:Brut +:Pek;
 ELSE Net:=(:Brut)-:SGKCal-:IszCal-:GV-:DV;
 EkKazanc:=:BrutEkKazanc +:NetEkKazanc;
 派克:=:Brut;
 万一;
 净:= round(:Net,2);
 IF(:Icra> 0)然后Icra:=(:Net *:IcraOran)/100.00;
 万一;
 Odenen:=:Net +:Agi-:Icra-:Bes-:EkKesinti;
 Maliyet:=:Brut +:SGKIsv +:IszIsv;
 插入表(" EmpId"," GVMatrah"," Brut"," SGKIsv"," IszCal"," IszIsv"," SGKCal"," GV"," DV"," Net"," EkKazanc"," Pek  "," IzinTutar"," Bes"," Icra"," Odenen"," Maliyet"," EkKesinti"," Mesai"," IcraOran"," DosyaNumarasi")值(round(" GvMatrah",2)  (:Brut,2),round(:SGKIsv,2),round(:IszCal,2),round(:IszIsv,2),round(:SGKCal,2),round(:GV,2),round(:  DV,2),round(:Net,2),round(:EkKazanc,2),round(:Pek,2),round(:IzinTutar,2),round(:Bes,2),round(:Icra,  2),圆(:Odenen,2),圆(:Maliyet,2),圆(:EkKesinti,2),圆(:MesaiTutar,2),圆(:IcraOran,2),圆(:DosyaNumarasi,2)  );
 返回;
 结束;
 

但是错误在这里:

在架构SBODEMOTR中找不到表/视图TABLE:第79行第13行(在pos 3861)

另一方面,我不能使用Select

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


你好;

我的功能在这里;

创建函数" HS_getMaasHesapla"(EmpId INT,MaasTuru VARCHAR(1),Donem VARCHAR(50),SablonCode VARCHAR(50),
        Maas DECIMAL(18,6),Brut DECIMAL(18,6),Pek DECIMAL(18,6),NetEkKazanc DECIMAL(18,6),BrutEkKazanc DECIMAL(18,6),
        EkKesinti DECIMAL(18,6),DvrGvMatrah DECIMAL(18,6),SonBrutMaas DECIMAL(18,6),HesaplananMatrah DECIMAL(18,6),
        IzinTutar DECIMAL(18,6),MesaiTutar DECIMAL(18,6),Agi DECIMAL(18,6),IsBes VARCHAR(1),IsIcra VARCHAR(1),
        登巴西(Donmbasi DATE)


 退货表
 (
     EmpId INT,GVMatrah DECIMAL(18,6),Brut DECIMAL(18,6),SGKIsv DECIMAL(18,6),IszCal DECIMAL(18,6),
     IszIsv DECIMAL(18,6),SGKCal十进制(18,6),GV十进制(18,6),DV十进制(18,6),净十进制(18,6),
     EkKazanc十进制(18,6),Pek十进制(18,6),IzinTutar十进制(18,6),Bes十进制(18,6),Icra十进制(18,6),
     Odenen十进制(18,6),Maliyet十进制(18,6),EkKesinti十进制(18,6),Mesai十进制(18,6)
     ,IcraOran十进制(18,6),DosyaNumarasi varchar(50)
 )
 语言SQLSCRIPT
 SQL安全定义器
 开始
 DV:=" HS_DVTutar"(:Brut,:donembasi,:donemsonu);
 IF(:MaasTuru ='B')THEN Net:=(:Brut)-:SGKCal-:IszCal-:GV-:DV;
 EkKazanc:=:BrutEkKazanc;
 Pek:=:Brut +:Pek;
 ELSE Net:=(:Brut)-:SGKCal-:IszCal-:GV-:DV;
 EkKazanc:=:BrutEkKazanc +:NetEkKazanc;
 派克:=:Brut;
 万一;
 净:= round(:Net,2);
 IF(:Icra> 0)然后Icra:=(:Net *:IcraOran)/100.00;
 万一;
 Odenen:=:Net +:Agi-:Icra-:Bes-:EkKesinti;
 Maliyet:=:Brut +:SGKIsv +:IszIsv;
 插入表(" EmpId"," GVMatrah"," Brut"," SGKIsv"," IszCal"," IszIsv"," SGKCal"," GV"," DV"," Net"," EkKazanc"," Pek  "," IzinTutar"," Bes"," Icra"," Odenen"," Maliyet"," EkKesinti"," Mesai"," IcraOran"," DosyaNumarasi")值(round(" GvMatrah",2)  (:Brut,2),round(:SGKIsv,2),round(:IszCal,2),round(:IszIsv,2),round(:SGKCal,2),round(:GV,2),round(:  DV,2),round(:Net,2),round(:EkKazanc,2),round(:Pek,2),round(:IzinTutar,2),round(:Bes,2),round(:Icra,  2),圆(:Odenen,2),圆(:Maliyet,2),圆(:EkKesinti,2),圆(:MesaiTutar,2),圆(:IcraOran,2),圆(:DosyaNumarasi,2)  );
 返回;
 结束;
 

但是错误在这里:

在架构SBODEMOTR中找不到表/视图TABLE:第79行第13行(在pos 3861)

另一方面,我不能使用Select

付费偷看设置
发送
1条回答
南山jay
1楼-- · 2020-09-24 06:38

用户定义的函数是只读结构(已记录)。

也许,如果您描述了您想要实现的目标,我们可以推荐一种替代方法。

一周热门 更多>