Sapnco3 RfcTable Structure
RfcTable 中字段 并不固定,以下内容仅供参考
1. 包含IDOC的 RfcTable
SDATA字段值为IDOC数据,解析IDOC数据需依据IDOC字段长度对SDATA进行截取
function.GetTable(0) {TABLE [STRUCTURE EDI_DC40 { FIELD TABNAM=EDI_DC40 FIELD MANDT=777 FIELD DOCNUM=0000000009241610 FIELD DOCREL=700 FIELD STATUS=30 FIELD DIRECT=1 FIELD OUTMOD=2 FIELD EXPRSS= FIELD TEST= FIELD IDOCTYP=ZTZECODE_IDOC FIELD CIMTYP= FIELD MESTYP=ZECODE_MSG FIELD MESCOD= FIELD MESFCT= FIELD STD= FIELD STDVRS= FIELD STDMES= FIELD SNDPOR=SAPASB FIELD SNDPRT=LS FIELD SNDPFC= FIELD SNDPRN=AZASB01777 FIELD SNDSAD= FIELD SNDLAD= FIELD RCVPOR=A000000017 FIELD RCVPRT=LS FIELD RCVPFC= FIELD RCVPRN=CN_ECODING FIELD RCVSAD= FIELD RCVLAD= FIELD CREDAT=2013-06-18 FIELD CRETIM=10:35:40 FIELD REFINT= FIELD REFGRP= FIELD REFMES= FIELD ARCKEY= FIELD SERIAL=20130618103540 }]} SAP.Middleware.Connector.IRfcTable {SAP.Middleware.Connector.RfcTable}
function.GetTable(1) {TABLE [STRUCTURE EDI_DD40 { FIELD SEGNAM=ZTZECODE000 FIELD MANDT=777 FIELD DOCNUM=0000000009241610 FIELD SEGNUM=000001 FIELD PSGNUM=000000 FIELD HLEVEL=02 FIELD SDATA=0003575897008500006600000010251 CNIT00006 9000001001 10010 2 1 }]} SAP.Middleware.Connector.IRfcTable {SAP.Middleware.Connector.RfcTable}
2.不包含IDOC的RfcTable
[SAP.Middleware.Connector.RfcTable] {TABLE [STRUCTURE ZSDJGM01 { FIELD KUNNR=0000001000 FIELD NAME1=安徽邦泰医 FIELD ZZDKHID= FIELD ZZDKH= FIELD VBELN=8000000001 FIELD MATNR=000000002015000211 FIELD MAKTX=胞磷胆碱钠氯化钠注射液&100ml:0.5gx80瓶 FIELD CHARG=2013052201 FIELD LFIMG=1.000 FIELD VRKME=KAR }]} SAP.Middleware.Connector.RfcTable
3.IDOC 字段长度定义(业务不同IDOC内容不同,以下内容仅供参考)
1 BEGIN_RECORD_SECTION 2 BEGIN_CONTROL_RECORD 3 BEGIN_FIELDS 4 NAME TABNAM 5 TEXT Name of Table Structure 6 TYPE CHARACTER 7 LENGTH 000010 8 FIELD_POS 0001 9 CHARACTER_FIRST 000001 10 CHARACTER_LAST 000010 11 12 NAME MANDT 13 TEXT Client 14 TYPE CHARACTER 15 LENGTH 000003 16 FIELD_POS 0002 17 CHARACTER_FIRST 000011 18 CHARACTER_LAST 000013 19 20 NAME DOCNUM 21 TEXT IDoc number 22 TYPE CHARACTER 23 LENGTH 000016 24 FIELD_POS 0003 25 CHARACTER_FIRST 000014 26 CHARACTER_LAST 000029 27 28 NAME DOCREL 29 TEXT SAP Release for IDoc 30 TYPE CHARACTER 31 LENGTH 000004 32 FIELD_POS 0004 33 CHARACTER_FIRST 000030 34 CHARACTER_LAST 000033 35 36 NAME STATUS 37 TEXT Status of IDoc 38 TYPE CHARACTER 39 LENGTH 000002 40 FIELD_POS 0005 41 CHARACTER_FIRST 000034 42 CHARACTER_LAST 000035 43 44 NAME DIRECT 45 TEXT Direction 46 TYPE CHARACTER 47 LENGTH 000001 48 FIELD_POS 0006 49 CHARACTER_FIRST 000036 50 CHARACTER_LAST 000036 51 52 NAME OUTMOD 53 TEXT Output mode 54 TYPE CHARACTER 55 LENGTH 000001 56 FIELD_POS 0007 57 CHARACTER_FIRST 000037 58 CHARACTER_LAST 000037 59 60 NAME EXPRSS 61 TEXT Overriding in inbound processing 62 TYPE CHARACTER 63 LENGTH 000001 64 FIELD_POS 0008 65 CHARACTER_FIRST 000038 66 CHARACTER_LAST 000038 67 68 NAME TEST 69 TEXT Test flag 70 TYPE CHARACTER 71 LENGTH 000001 72 FIELD_POS 0009 73 CHARACTER_FIRST 000039 74 CHARACTER_LAST 000039 75 76 NAME IDOCTYP 77 TEXT Name of basic type 78 TYPE CHARACTER 79 LENGTH 000030 80 FIELD_POS 0010 81 CHARACTER_FIRST 000040 82 CHARACTER_LAST 000069 83 84 NAME CIMTYP 85 TEXT Extension (defined by customer) 86 TYPE CHARACTER 87 LENGTH 000030 88 FIELD_POS 0011 89 CHARACTER_FIRST 000070 90 CHARACTER_LAST 000099 91 92 NAME MESTYP 93 TEXT Message type 94 TYPE CHARACTER 95 LENGTH 000030 96 FIELD_POS 0012 97 CHARACTER_FIRST 000100 98 CHARACTER_LAST 000129 99 100 NAME MESCOD 101 TEXT Message code 102 TYPE CHARACTER 103 LENGTH 000003 104 FIELD_POS 0013 105 CHARACTER_FIRST 000130 106 CHARACTER_LAST 000132 107 108 NAME MESFCT 109 TEXT Message Function 110 TYPE CHARACTER 111 LENGTH 000003 112 FIELD_POS 0014 113 CHARACTER_FIRST 000133 114 CHARACTER_LAST 000135 115 116 NAME STD 117 TEXT EDI standard, flag 118 TYPE CHARACTER 119 LENGTH 000001 120 FIELD_POS 0015 121 CHARACTER_FIRST 000136 122 CHARACTER_LAST 000136 123 124 NAME STDVRS 125 TEXT EDI standard, version and release 126 TYPE CHARACTER 127 LENGTH 000006 128 FIELD_POS 0016 129 CHARACTER_FIRST 000137 130 CHARACTER_LAST 000142 131 132 NAME STDMES 133 TEXT EDI message type 134 TYPE CHARACTER 135 LENGTH 000006 136 FIELD_POS 0017 137 CHARACTER_FIRST 000143 138 CHARACTER_LAST 000148 139 140 NAME SNDPOR 141 TEXT Sender port (SAP System, external subsystem) 142 TYPE CHARACTER 143 LENGTH 000010 144 FIELD_POS 0018 145 CHARACTER_FIRST 000149 146 CHARACTER_LAST 000158 147 148 NAME SNDPRT 149 TEXT Partner type of sender 150 TYPE CHARACTER 151 LENGTH 000002 152 FIELD_POS 0019 153 CHARACTER_FIRST 000159 154 CHARACTER_LAST 000160 155 156 NAME SNDPFC 157 TEXT Partner Function of Sender 158 TYPE CHARACTER 159 LENGTH 000002 160 FIELD_POS 0020 161 CHARACTER_FIRST 000161 162 CHARACTER_LAST 000162 163 164 NAME SNDPRN 165 TEXT Partner Number of Sender 166 TYPE CHARACTER 167 LENGTH 000010 168 FIELD_POS 0021 169 CHARACTER_FIRST 000163 170 CHARACTER_LAST 000172 171 172 NAME SNDSAD 173 TEXT Sender address (SADR) 174 TYPE CHARACTER 175 LENGTH 000021 176 FIELD_POS 0022 177 CHARACTER_FIRST 000173 178 CHARACTER_LAST 000193 179 180 NAME SNDLAD 181 TEXT Logical address of sender 182 TYPE CHARACTER 183 LENGTH 000070 184 FIELD_POS 0023 185 CHARACTER_FIRST 000194 186 CHARACTER_LAST 000263 187 188 NAME RCVPOR 189 TEXT Receiver port 190 TYPE CHARACTER 191 LENGTH 000010 192 FIELD_POS 0024 193 CHARACTER_FIRST 000264 194 CHARACTER_LAST 000273 195 196 NAME RCVPRT 197 TEXT Partner Type of Receiver 198 TYPE CHARACTER 199 LENGTH 000002 200 FIELD_POS 0025 201 CHARACTER_FIRST 000274 202 CHARACTER_LAST 000275 203 204 NAME RCVPFC 205 TEXT Partner function of recipient 206 TYPE CHARACTER 207 LENGTH 000002 208 FIELD_POS 0026 209 CHARACTER_FIRST 000276 210 CHARACTER_LAST 000277 211 212 NAME RCVPRN 213 TEXT Partner Number of Receiver 214 TYPE CHARACTER 215 LENGTH 000010 216 FIELD_POS 0027 217 CHARACTER_FIRST 000278 218 CHARACTER_LAST 000287 219 220 NAME RCVSAD 221 TEXT Recipient address (SADR) 222 TYPE CHARACTER 223 LENGTH 000021 224 FIELD_POS 0028 225 CHARACTER_FIRST 000288 226 CHARACTER_LAST 000308 227 228 NAME RCVLAD 229 TEXT Logical address of recipient 230 TYPE CHARACTER 231 LENGTH 000070 232 FIELD_POS 0029 233 CHARACTER_FIRST 000309 234 CHARACTER_LAST 000378 235 236 NAME CREDAT 237 TEXT Created on 238 TYPE CHARACTER 239 LENGTH 000008 240 FIELD_POS 0030 241 CHARACTER_FIRST 000379 242 CHARACTER_LAST 000386 243 244 NAME CRETIM 245 TEXT Created at 246 TYPE CHARACTER 247 LENGTH 000006 248 FIELD_POS 0031 249 CHARACTER_FIRST 000387 250 CHARACTER_LAST 000392 251 252 NAME REFINT 253 TEXT Transmission file (EDI Interchange) 254 TYPE CHARACTER 255 LENGTH 000014 256 FIELD_POS 0032 257 CHARACTER_FIRST 000393 258 CHARACTER_LAST 000406 259 260 NAME REFGRP 261 TEXT Message group (EDI Message Group) 262 TYPE CHARACTER 263 LENGTH 000014 264 FIELD_POS 0033 265 CHARACTER_FIRST 000407 266 CHARACTER_LAST 000420 267 268 NAME REFMES 269 TEXT Message (EDI Message) 270 TYPE CHARACTER 271 LENGTH 000014 272 FIELD_POS 0034 273 CHARACTER_FIRST 000421 274 CHARACTER_LAST 000434 275 276 NAME ARCKEY 277 TEXT Key for external message archive 278 TYPE CHARACTER 279 LENGTH 000070 280 FIELD_POS 0035 281 CHARACTER_FIRST 000435 282 CHARACTER_LAST 000504 283 284 NAME SERIAL 285 TEXT Serialization 286 TYPE CHARACTER 287 LENGTH 000020 288 FIELD_POS 0036 289 CHARACTER_FIRST 000505 290 CHARACTER_LAST 000524 291 END_FIELDS 292 END_CONTROL_RECORD 293 BEGIN_DATA_RECORD 294 BEGIN_FIELDS 295 NAME SEGNAM 296 TEXT Segment (external name) 297 TYPE CHARACTER 298 LENGTH 000030 299 FIELD_POS 0001 300 CHARACTER_FIRST 000001 301 CHARACTER_LAST 000030 302 303 NAME MANDT 304 TEXT Client 305 TYPE CHARACTER 306 LENGTH 000003 307 FIELD_POS 0002 308 CHARACTER_FIRST 000031 309 CHARACTER_LAST 000033 310 311 NAME DOCNUM 312 TEXT IDoc number 313 TYPE CHARACTER 314 LENGTH 000016 315 FIELD_POS 0003 316 CHARACTER_FIRST 000034 317 CHARACTER_LAST 000049 318 319 NAME SEGNUM 320 TEXT Segment Number 321 TYPE CHARACTER 322 LENGTH 000006 323 FIELD_POS 0004 324 CHARACTER_FIRST 000050 325 CHARACTER_LAST 000055 326 327 NAME PSGNUM 328 TEXT Number of superior parent segment 329 TYPE CHARACTER 330 LENGTH 000006 331 FIELD_POS 0005 332 CHARACTER_FIRST 000056 333 CHARACTER_LAST 000061 334 335 NAME HLEVEL 336 TEXT Hierarchy level of SAP segment 337 TYPE CHARACTER 338 LENGTH 000002 339 FIELD_POS 0006 340 CHARACTER_FIRST 000062 341 CHARACTER_LAST 000063 342 343 NAME SDATA 344 TEXT Application data 345 TYPE CHARACTER 346 LENGTH 001000 347 FIELD_POS 0007 348 CHARACTER_FIRST 000064 349 CHARACTER_LAST 001063 350 END_FIELDS 351 END_DATA_RECORD 352 BEGIN_STATUS_RECORD 353 BEGIN_FIELDS 354 NAME TABNAM 355 TEXT Name of Table Structure 356 TYPE CHARACTER 357 LENGTH 000010 358 FIELD_POS 0001 359 CHARACTER_FIRST 000001 360 CHARACTER_LAST 000010 361 362 NAME MANDT 363 TEXT Client 364 TYPE CHARACTER 365 LENGTH 000003 366 FIELD_POS 0002 367 CHARACTER_FIRST 000011 368 CHARACTER_LAST 000013 369 370 NAME DOCNUM 371 TEXT IDoc number 372 TYPE CHARACTER 373 LENGTH 000016 374 FIELD_POS 0003 375 CHARACTER_FIRST 000014 376 CHARACTER_LAST 000029 377 378 NAME LOGDAT 379 TEXT Date of status information 380 TYPE CHARACTER 381 LENGTH 000008 382 FIELD_POS 0004 383 CHARACTER_FIRST 000030 384 CHARACTER_LAST 000037 385 386 NAME LOGTIM 387 TEXT Time of status information 388 TYPE CHARACTER 389 LENGTH 000006 390 FIELD_POS 0005 391 CHARACTER_FIRST 000038 392 CHARACTER_LAST 000043 393 394 NAME STATUS 395 TEXT Status of IDoc 396 TYPE CHARACTER 397 LENGTH 000002 398 FIELD_POS 0006 399 CHARACTER_FIRST 000044 400 CHARACTER_LAST 000045 401 402 NAME STAMQU 403 TEXT Status for message in status record 404 TYPE CHARACTER 405 LENGTH 000003 406 FIELD_POS 0007 407 CHARACTER_FIRST 000046 408 CHARACTER_LAST 000048 409 410 NAME STAMID 411 TEXT Message for status notification: Message class 412 TYPE CHARACTER 413 LENGTH 000020 414 FIELD_POS 0008 415 CHARACTER_FIRST 000049 416 CHARACTER_LAST 000068 417 418 NAME STAMNO 419 TEXT Message number for status message 420 TYPE CHARACTER 421 LENGTH 000003 422 FIELD_POS 0009 423 CHARACTER_FIRST 000069 424 CHARACTER_LAST 000071 425 426 NAME STATYP 427 TEXT ABAP message type (A, W, E, S, I) in status message 428 TYPE CHARACTER 429 LENGTH 000001 430 FIELD_POS 0010 431 CHARACTER_FIRST 000072 432 CHARACTER_LAST 000072 433 434 NAME STAPA1 435 TEXT First parameter for message in status record 436 TYPE CHARACTER 437 LENGTH 000050 438 FIELD_POS 0011 439 CHARACTER_FIRST 000073 440 CHARACTER_LAST 000122 441 442 NAME STAPA2 443 TEXT Second parameter for message in status record 444 TYPE CHARACTER 445 LENGTH 000050 446 FIELD_POS 0012 447 CHARACTER_FIRST 000123 448 CHARACTER_LAST 000172 449 450 NAME STAPA3 451 TEXT Third parameter for message in status record 452 TYPE CHARACTER 453 LENGTH 000050 454 FIELD_POS 0013 455 CHARACTER_FIRST 000173 456 CHARACTER_LAST 000222 457 458 NAME STAPA4 459 TEXT Fourth parameter for message in status record 460 TYPE CHARACTER 461 LENGTH 000050 462 FIELD_POS 0014 463 CHARACTER_FIRST 000223 464 CHARACTER_LAST 000272 465 466 NAME STATXT 467 TEXT Status text 468 TYPE CHARACTER 469 LENGTH 000070 470 FIELD_POS 0015 471 CHARACTER_FIRST 000273 472 CHARACTER_LAST 000342 473 474 NAME UNAME 475 TEXT User Name 476 TYPE CHARACTER 477 LENGTH 000012 478 FIELD_POS 0016 479 CHARACTER_FIRST 000343 480 CHARACTER_LAST 000354 481 482 NAME REPID 483 TEXT Program 484 TYPE CHARACTER 485 LENGTH 000030 486 FIELD_POS 0017 487 CHARACTER_FIRST 000355 488 CHARACTER_LAST 000384 489 490 NAME ROUTID 491 TEXT Subroutine (routine, function module) 492 TYPE CHARACTER 493 LENGTH 000030 494 FIELD_POS 0018 495 CHARACTER_FIRST 000385 496 CHARACTER_LAST 000414 497 498 NAME SEGNUM 499 TEXT Segment Number 500 TYPE CHARACTER 501 LENGTH 000006 502 FIELD_POS 0019 503 CHARACTER_FIRST 000415 504 CHARACTER_LAST 000420 505 506 NAME SEGFLD 507 TEXT Segment field 508 TYPE CHARACTER 509 LENGTH 000030 510 FIELD_POS 0020 511 CHARACTER_FIRST 000421 512 CHARACTER_LAST 000450 513 514 NAME REFINT 515 TEXT Transmission file (EDI Interchange) 516 TYPE CHARACTER 517 LENGTH 000014 518 FIELD_POS 0021 519 CHARACTER_FIRST 000451 520 CHARACTER_LAST 000464 521 522 NAME REFGRP 523 TEXT Message group (EDI Message Group) 524 TYPE CHARACTER 525 LENGTH 000014 526 FIELD_POS 0022 527 CHARACTER_FIRST 000465 528 CHARACTER_LAST 000478 529 530 NAME REFMES 531 TEXT Message (EDI Message) 532 TYPE CHARACTER 533 LENGTH 000014 534 FIELD_POS 0023 535 CHARACTER_FIRST 000479 536 CHARACTER_LAST 000492 537 538 NAME ARCKEY 539 TEXT Key for external message archive 540 TYPE CHARACTER 541 LENGTH 000070 542 FIELD_POS 0024 543 CHARACTER_FIRST 000493 544 CHARACTER_LAST 000562 545 END_FIELDS 546 END_STATUS_RECORD 547 END_RECORD_SECTION 548 BEGIN_SEGMENT_SECTION 549 BEGIN_IDOC ZTZECODE_IDOC 550 BEGIN_SEGMENT ZTZECODE000 551 SEGMENTTYPE ZTZECODE 552 LEVEL 02 553 STATUS MANDATORY 554 LOOPMIN 0000000001 555 LOOPMAX 0000999999 556 BEGIN_FIELDS 557 NAME MBLNR 558 TEXT Number of Material Document 559 TYPE CHARACTER 560 LENGTH 000010 561 FIELD_POS 0001 562 CHARACTER_FIRST 000064 563 CHARACTER_LAST 000073 564 565 NAME VBELN 566 TEXT Sales and Distribution Document Number 567 TYPE CHARACTER 568 LENGTH 000010 569 FIELD_POS 0002 570 CHARACTER_FIRST 000074 571 CHARACTER_LAST 000083 572 573 NAME ZSHIPNO 574 TEXT Sales and Distribution Document Number 575 TYPE CHARACTER 576 LENGTH 000010 577 FIELD_POS 0003 578 CHARACTER_FIRST 000084 579 CHARACTER_LAST 000093 580 581 NAME ZORDTYP 582 TEXT Selection value 1 583 TYPE CHARACTER 584 LENGTH 000020 585 FIELD_POS 0004 586 CHARACTER_FIRST 000094 587 CHARACTER_LAST 000113 588 589 NAME KUNNR 590 TEXT Customer Number 1 591 TYPE CHARACTER 592 LENGTH 000010 593 FIELD_POS 0005 594 CHARACTER_FIRST 000114 595 CHARACTER_LAST 000123 596 597 NAME PRODCD 598 TEXT Product Code 599 TYPE CHARACTER 600 LENGTH 000040 601 FIELD_POS 0006 602 CHARACTER_FIRST 000124 603 CHARACTER_LAST 000163 604 605 NAME CHARG 606 TEXT Batch Number 607 TYPE CHARACTER 608 LENGTH 000010 609 FIELD_POS 0007 610 CHARACTER_FIRST 000164 611 CHARACTER_LAST 000173 612 613 NAME MENGE 614 TEXT Quantity 615 TYPE CHARACTER 616 LENGTH 000015 617 FIELD_POS 0008 618 CHARACTER_FIRST 000174 619 CHARACTER_LAST 000188 620 621 NAME ZFLAG 622 TEXT Enhancement active indicator 623 TYPE CHARACTER 624 LENGTH 000001 625 FIELD_POS 0009 626 CHARACTER_FIRST 000189 627 CHARACTER_LAST 000189 628 629 NAME SMBLN 630 TEXT Number of Material Document 631 TYPE CHARACTER 632 LENGTH 000010 633 FIELD_POS 0010 634 CHARACTER_FIRST 000190 635 CHARACTER_LAST 000199 636 END_FIELDS 637 END_SEGMENT 638 END_IDOC 639 END_SEGMENT_SECTION