1、VBFA(销售凭证流) 这张表记录销售订单对应的交货单(子层凭证类别VBTYP_N = ‘J’),以及底层过账发货生成的物料 凭证(子层凭证类别VBTYP_N = ‘R’)、冲销交货单生成的物料凭证(子层类别VBTYP_N = ‘H’),还有等等。 2、VBUK(销售凭证 : 抬头状态和管理数据) 这张表既记录了销售订单的表头交货状态...
MOVE: wa_xlikp-vbtyp TO z_vbtyp. ENDCASE. IF z_vbtyp EQ 'J' or "outbound del. z_vbtyp eq 'T'. "return del. "V003 MOVE: wa_xlips-werks TO z_werks, "V002 "SBr16072007 wa_xlikp-vkorg TO z_vkorg. ELSEIF z_vbtyp EQ '7'. "shipp.notification MOVE: space TO z_vkorg...
在凭证流表VBFA中,可以通过前续凭证查找后续凭证,但是通过后续凭证查找前续凭证是没有意义的,因为前续凭证都直接保存在凭证表中(lips,vbrp等)。VBFA表的主键如下:字段VBTYP_N的固定值可以在domain中查看,如下:所以,错误代码:SELECT vbelv FROM vbfa WHERE vbeln ... 1 SELECT vbelv FROM vbfa WHERE vbeln ....
inner join sapsr3.vbfa@sap va2 ON va2.VBELV = vp2.vbeln AND va2.POSNV = vp2.posnr and ( va2.VBTYP_N = 'T' or va2.VBTYP_N = 'J' ) inner join sapsr3.vbup@sap vu on vu.vbeln = va2.VBELN and vu.posnr = va2.POSNN and vu.WBSTA = 'C' group by vp2.vbeln,...
inner join sapsr3.vbfa va2 ON va2.VBELV = vp2.vbeln AND va2.POSNV = vp2.posnr and ( va2.VBTYP_N = 'T' or va2.VBTYP_N = 'J' ) --找到相应的交货单 inner join sapsr3.vbup vu on vu.vbeln = va2.VBELN and vu.posnr = va2.POSNN and vu.WBSTA = 'C' --交货单已...
ABAP有它自己独特的取数方法与逻辑, 和我们用SQL语句直接查询不同, 这个思维要转换过来! !第一步: 到出作为筛选条件的数据放入内表:SELECT vbeln FROM vbfa INTO TABLE gt_vbfa WHERE vbtyp_n = 'J' .第二步: 用FOR ALL ENTRIES IN 前要先判断是否为空 IF gt_vbfa IS NOT INITIAL .S...
VBFA单据流表进行查找,因为VBFA在vbeln、posnn字段上创建了索引(虽然查询时WHERE从句条件字段不是按主键字段顺序——使用的是后半部分主键,所以用不到主键索引,但是是按非主键索引字段顺序书写,所以还是可以用到索引):vbfa~vbeln=vbap-vbelnANDvbfa~posnn=vbap-posnrANDvbfa~vbtyp_v='V' ANDvbfa~vbtyp_n= ...
2.If VBFA-VBTYP_N = M , then check for VBUP-GBSTA not equal to C. If either of the above conditions are fulfilled, the lines should be shown in the report. My question is , can we use a single query to give two different outputs for the above two cases. I was thinkin of usin...
* sql_string = 'vbak~auart IN @s_auart AND vbap~lfsta IN @s_lfsta AND vbak~vkorg IN @s_vkorg AND vbak~vtweg IN @s_vtweg AND vbak~spart IN @s_spart AND vbak~erdat IN @s_erdat AND vbak~vbeln IN @s_vbeln AND vbap~ab * ENDIF.* ENDIF.* s_lfsta...
For some of cases Value Range is assigned as either single value or Value table for a Domain. Lets say If you look at the Table VBFA For the field Data element-VBTYP_N Domain-VBTYP - Document Category There are fixed value i.e. Single value (A,B,C,D...U,V,W,X,0,1,2...8...